Organizational Research By

Surprising Reserch Topic

n gram generation from a sentence using -'java,lucene,nlp,n-gram'


n gram generation from a sentence  using -'java,lucene,nlp,n-gram'

How to generate an n-gram of a string like:

String Input="This is my car."


I want to generate n-gram with this input:

Input Ngram size = 3


Output should be:

This
is
my
car

This is
is my
my car

This is my
is my car


Give some idea in Java, how to implement that or if any library is available for it.

I am trying to use this NGramTokenizer but its giving n-gram's of character sequence and I want n-grams of word sequence.
    
asked Sep 7, 2015 by rajesh
0 votes
12 views



Related Hot Questions



Government Jobs Opening


...