Testing the NLTK classifier on specific file
The following code run Naive Bayes movie review classifier. The code generate a list of the most informative features. Note: **movie review** folder is in the nltk. from itertools import chain from nltk.corpus import stopwords from nltk.probability import FreqDist from nltk.classify import NaiveBayesClassifier from nltk.corpus import movie_reviews stop = stopwords.words('english') documents =
| Penerbit | Taratsa |
|---|---|
| Tahun | 2017-02-07 |
| Bahasa | ind |
| Pengenal | bookid: urn:uuid:362b1fe7-5452-5ec1-90d9-0d85b0ba9bad |