Subject: Perl manual search tool perlindex available
From: [email-masked] (Ulrich Pfeifer)
Date: 6 Feb 1996 16:23:30 GMT
Newsgroups: comp.lang.perl.announce,comp.lang.perl.misc

Perlindex is a index and query tool for the Perl 5.* manual pages.  It
uses Anydbm databases to store the index. So you need at least one
working dbm module.

Here is an example:

% perlindex How do I compute the basename of a path?

 1  2.590 man/man3/File::Basename.3
 2  2.347 bin/perldoc
 3  1.403 man/man3/File::Path.3
 4  0.948 man/man1/perlsec.1
 5  0.893 man/man3/DynaLoader.3
 6  0.818 man/man3/Env.3
 7  0.818 man/man3/ExtUtils::Liblist.3
 8  0.756 man/man3/integer.3
 9  0.529 man/man3/Font::AFM.3

Enter Number or 'q'> 1
Running man 3 File::Basename
Reformatting page.  Please wait ... 

Get it from CPAN/authors/id/ULPFR/perlindex.gz

Enjoy

Ulrich Pfeifer

NAME
       perlindex - index and query perl manual pages

SYNOPSIS
           perlindex -index

           perlindex tell me where the flowers are

DESCRIPTION
       "perlindex -index" generates an AnyDBM_File index which
       can be searched with free text queries "perlindex a
       verbose query".

       Each word of the query is searched in the index and a
       score is generated for each document containing it. Scores
       for all words are added and the documents with the highest
       score are printed.

       The score is computed as:

           $score{$document} += $tf{$word,$document}/$maxtf{$document}
                                * log ($N/$n{$word});

       where

       $N        is the number of documents in the index,

       $n{$word} is the number of documents containing the word,

       $tf{$word,$document}
                 is the number of occurances of word in the
                 document, and

       $maxtf{$document}
                 is the maximum freqency of any word in document.

OPTIONS
       All options may be abreviated.

       -maxhits maxhits
                 Maximum numer of hits to display. Default is 10.

       -menu

       -nomenu   Use the matches as menu for calling man. Default
                 is -menu.q

FILES
       The index will be generated in your man directory.
       Strictly speaking in $Config{man1direxp}/..

           The following files will be generated:

           index_fn           # docid -> (max frequency, filename)
           index_idf          # term  -> number of documents containing term
           index_if           # term  -> (docid, frequency)*
           index_seen         # fn    -> indexed?

AUTHOR
       Ulrich Pfeifer <[email-masked]>

-- 
Ulrich  UNIVERSITAET-DORTMUND     telefax:  49 231 755 2405        /////
Pfeifer Lehrstuhl Informatik VI   voice:    49 231 755 3032  ____UNI DO
@RR     D-44221 Dortmund          postbox:  50 05 00         \\*\\////
http://ls6-www.informatik.uni-dortmund.de/WhoIsWhoAtLS6.html  \\\\\//