Hello all,
I am facing a problem with nltk.lm module.
After running the following code multiple times, I get different results:
lm.fit(train, vocab)
len(lm.vocab)
in output sometimes I get 0 and sometimes a number for the same text and code.
Outout: <NgramCounter with 1 ngram orders and 0 ngrams>
Even with learned vocab, ngrams are not generated.
I am attaching the code with the output.
I do not understand this behavior - different results at different times.
Thanks in advance. I am new to this group. Any help will be appreciated.
Monali