count number of distinct words
问题 I am trying to count the number of distinct words in the text, using Java. The word can be a unigram, bigram or trigram noun. These three are already found out by using Stanford POS tagger, but I'm not able to calculate the words whose frequency is greater than equal to one, two, three, four and five, and their counts. 回答1: I might not be understanding correctly, but if all you need to do is count the number of distinct words in a given text depending on where/how you are getting the words