nltk.SklearnClassifier

class nltk.SklearnClassifier(estimator, dtype=<type 'float'>, sparse=True)[source]

Wrapper for scikit-learn classifiers.

Methods

__init__(estimator[, dtype, sparse])
param estimator:
 scikit-learn classifier object.
classify(featureset)
return:the most appropriate label for the given featureset.
classify_many(featuresets) Classify a batch of samples.
labels() The class labels used by this classifier.
prob_classify(featureset)
return:a probability distribution over labels for the given
prob_classify_many(featuresets) Compute per-class probabilities for a batch of samples.
train(labeled_featuresets) Train (fit) the scikit-learn estimator.
unicode_repr()