Skip to content Skip to sidebar Skip to footer

Naive Base Classifier Of Nltk Giving Unhashable Type Error

Following is the code that I wrote using nltk and Python. import nltk import random from nltk.corpus import movie_reviews #from sklearn.naive_bayes import GaussianNB documents

Solution 1:

Just in def find_features while constructing the features dictionary pass value in normal brackets.

example:

forwin word_features:
    features[w] = (w in words)

Post a Comment for "Naive Base Classifier Of Nltk Giving Unhashable Type Error"