Yang Gao's implementation of tf-idf text indexing scheme, predict doc similarity by cosine similarity.