Lucene. How to build a term-doc matrix
Does anyone know a way to perform that?
Thanks in advance AntonioOne way, not using Lucene, is described in Sujit Pal's blog. Alternatively, you can build a Lucene index that has term vectors per field, iterate over terms to get idf, then iterate over term's documents to get tf.
精彩评论