nltk.PositiveNaiveBayesClassifier

class nltk.PositiveNaiveBayesClassifier(label_probdist, feature_probdist)[source]

Methods

__init__(label_probdist, feature_probdist)
param label_probdist:
 P(label), the probability distribution
classify(featureset)
classify_many(featuresets) Apply self.classify() to each element of featuresets.
labels()
most_informative_features([n]) Return a list of the ‘most informative’ features used by this classifier.
prob_classify(featureset)
prob_classify_many(featuresets) Apply self.prob_classify() to each element of featuresets.
show_most_informative_features([n])
train(positive_featuresets, ...[, ...])
param positive_featuresets:
 A list of featuresets that are known as positive