lucene at mikemccandless
May 15, 2012, 11:04 AM
Post #2 of 2
You can get a TermEnum (IndexReader.terms()) and then keep calling
Re: How to construct the term frequency vector of all words in dictionary?
[In reply to]
.next() to advance to the next term, and then .docFreq() to get the
document frequency (how many documents have the term) for that term...
On Tue, May 15, 2012 at 1:24 PM, Aoi Morida <xu.xumiao [at] gmail> wrote:
> Hi all,
> I want to create the term frequency vector for all words in the dictionary.
> I find that the function getTermFreqVector() can only give term frequency of
> the words existed in the particular document.
> BTW, I want to extract words in the dictionary and I find that the function
> getWordsIterator() can do this. But as I import
> org.apache.lucene.search.spell.LuceneDictionary, there is always an error
> message. I wondered what's wrong with it. My lucene version is 2.9.4.
> Thank you.
> View this message in context: http://lucene.472066.n3.nabble.com/How-to-construct-the-term-frequency-vector-of-all-words-in-dictionary-tp3983898.html
> Sent from the Lucene - General mailing list archive at Nabble.com.