Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear PerlMonks,
I'm using the module Search::VectorSpace to query a list of documents and return the relevant documents.
the description given in the module is as follows:-
I have given a list of documents:-use Search::VectorSpace; my @docs = ...; my $engine = Search::VectorSpace->new( docs =>\@docs, threshol +d => .04); $engine->build_index(); while ( my $query = <> ) { my %results = $engine->search( $query ); print join "\n", keys %results;
But the search is done only on the file names, but not the contents of the file. How do I search for something within the files of the given directory?$dr="C:\\Users\\Desktop\\collection2"; opendir(DR, "$dr") || die "error" ; @docs=<DR>; @docs=readdir DR;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Help, directories?
by choroba (Cardinal) on Dec 05, 2012 at 15:01 UTC | |
by Anonymous Monk on Dec 05, 2012 at 18:28 UTC | |
Re: Help, directories?
by Rudolf (Pilgrim) on Dec 05, 2012 at 15:36 UTC |
Back to
Seekers of Perl Wisdom