Dear Perl Monks, I am tring to use the module Search:VectorSpace to search for documents containing my query terms. But I'm not able to implement it. http://www.perl.com/pub/2003/02/19/engine.html
As mentioned in the module description above, I just need to place my document list in the @docs array. But on doing so, the search is happening only on the document names, but not the content. This is how I did it, is it right?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; }
I want it to search inside the document, not the document names.$dr="C:\\Users\\Desktop\\collection2"; opendir(DR, "$dr") || die "$!" ; @docs=<DR>; @docs=readdir DR;
In reply to Vector space search by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |