Hi Team,

I am creating an n-gram analysis on a text mining data however receiving the error as:-

Error in .jcall("RWekaInterfaces", "[S", "tokenize", .jcast(tokenizer, :

java.lang.NullPointerException

I have used the function:

Ngramtok= function(x)NGramTokenizer(x, Weka_control(min=1, max=5))

and then using this as below:-

ngram1= DocumentTermMatrix(cnt_reason,control = list(tokenize= Ngramtok)).

Checked stack overflow for the error here - http://stackoverflow.com/questions/38605088/creating-ngrams-in-r where it was advised to remove the blank rows but it did not help.

I have strangely used this earlier but it now not working now.

Please suggest.

More Shivi Bhatia's questions See All
Similar questions and discussions