A command line tool for calculate the relevance between TERMs and FILEs.
It was designed for generate some decent searching result from filesystem without external index nor particular tokenizing algorithm.
The program's name 'tf' mean the original algorithm Term-Frequency. But the program not fully respect the TF. It added some tweaks to enhance the relevance accuracy.
tf <term> -f <filename>
tf <term1> <term2> <term3> -f <filename1> -f <filename2>
echo <filename> | tf <term>
find . -iname '*.txt' | tf <term1> <term2> | sort -n
Output example:
0.14094721 file1.txt
13.01023817 file2.txt
The input files be considered as using utf8
encoding. No matter what the true encoding it is.
https://github.com/visig9/tf/releases
Prepare a golang environment, then:
go get -d -t github.com/visig9/tf/...
cd $(go env GOPATH)/src/github.com/visig9/tf
./maintain.sh install
MIT