This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// search returns array of matching docs ranked by tf-idf score | |
// aka term frequency * inverse document frequency | |
// | |
// tf = # of occurences of term in document / # of words in document | |
// idf = log ( # of documents / # of documents with term ) | |
// tf-idf = tf * idf | |
// multi-term tf-idf = sum of tf-idf scores (per document) | |
import java.util.Arrays; |