Using java program

I have a set of documents. I want to know the frequency of each word in each document (i.e.) using a java program. thanks in advance. I know how to find the frequency for each word. My question is how to accept unique words in each document from the list of documents

+3
source share
2 answers

You can divide your documents into spaces and punctuation, go through the resulting array and then calculate the frequency for each word (a Map<String, Integer>really helps you with that).


Resources:

In the same topic:

+2
source

, Lucene . .

+1

Source: https://habr.com/ru/post/1763349/


All Articles