python - Is there an alternate for the now removed module 'nltk.model.NGramModel'? -
python - Is there an alternate for the now removed module 'nltk.model.NGramModel'? -
i've been trying find out alternative 2 straight days now, , couldn't find relevant. i'm trying probabilistic score of synthesized sentence (synthesized replacing words original sentence picked corpora).
i tried collocations, scores i'm getting aren't helpful. tried making utilize of language model concept, find seemingly helpful module 'model' has been removed nltk because of bugs.
it'd great if either allow me know alternate way ngram model implementation in python, or improve yet, suggest me other way solve problem of 'scoring' sentence.
according this open issue on nltk repo, ngrammodel
not in master because of bugs. current solution install code model branch. 8 months behind master though, might miss out on other features , bug fixes.
pip install https://github.com/nltk/nltk/tarball/model
the relevant code here in model branch. re-create local code if don't want utilize outdated branch. if care using seek prepare the outstanding bugs on , submit pull request.
python nltk n-gram
Comments
Post a Comment