nltk.classify.ClassifierI
¶
-
class
nltk.classify.
ClassifierI
[source]¶ A processing interface for labeling tokens with a single category label (or “class”). Labels are typically strs or ints, but can be any immutable type. The set of labels that the classifier chooses from must be fixed and finite.
- Subclasses must define:
labels()
- either
classify()
orclassify_many()
(or both)
- Subclasses may define:
- either
prob_classify()
orprob_classify_many()
(or both)
- either
Methods¶
classify (featureset) |
|
||
classify_many (featuresets) |
Apply self.classify() to each element of featuresets . |
||
labels () |
|
||
prob_classify (featureset) |
|
||
prob_classify_many (featuresets) |
Apply self.prob_classify() to each element of featuresets . |