Java-Counting occurrence of word from huge textfile

Posted by Naveen on Stack Overflow See other posts from Stack Overflow or by Naveen
Published on 2011-02-09T06:45:37Z Indexed on 2011/02/09 7:25 UTC
Read the original article Hit count: 109

Filed under:
|

I have a text file of size 115MB. It consists of about 20 million words. I have to use the file as a word collection, and use it to search the occurrence of each user-given words from the collection. I am using this process as a small part in my project. I need a method for finding out the number of occurrence of given words in a faster and correct manner since i may use it in iterations. I am in need of suggestion about any API that i can make use or some other way that performs the task in a quicker manner. Any recommendations are appreciated.

© Stack Overflow or respective owner

Related posts about java

Related posts about full-text-search