#!/usr/bin/perl

# This scripts shows thow to get the result for one or more words only


#use: perl grep.pl <kvecfile> <word1> [<word2> <word3> .... <wordN>]

use Lingua::BiTerm;
use Data::Dumper;

$file1=shift;
$file2=shift || die ("you must input 2 filenames");
$word=shift || die ("you must inot 2 filenames and at least one word to search");
push @words,$word;
while($word=shift)
{
	push @words,$word;
}
$a= newKvec Lingua::BiTerm($file1,$file2);
$b=$a->grep(@words);
$b->calcStat("right fisher");
$b->rank();
$b->printStdOut();



