How to generate N-Grams using Regular Expressions in java and storing them in Csv file?

18 views
Skip to first unread message

Munazza Jannisar Khan

unread,
Oct 15, 2014, 4:44:26 AM10/15/14
to berkeleyl...@googlegroups.com

I have a class named WordListBuilder that reads input from a text file in any language. Output is to generate a .CSV file where it stores the word and frequency of that word, that is from any language. IndoEuropeanTokenizerFactory is used to create tokens. Another class Language Utils has a method that converts lines to words(has been used in wordlist builder) is shown in text file attached.Code looks fine. The tokens do get printed on console but code does not write anything into CSV file. Help will be appreciated.


File.txt
Reply all
Reply to author
Forward
0 new messages