ó <ŋCVc@sFdZddlmZdefd„ƒYZdefd„ƒYZdS(sÏ Interfaces for labeling tokens with category labels (or "class labels"). ``ClassifierI`` is a standard interface for "single-category classification", in which the set of categories is known, the number of categories is finite, and each text belongs to exactly one category. ``MultiClassifierI`` is a standard interface for "multi-category classification", which is like single-category classification except that each text belongs to zero or more categories. iĸĸĸĸ(t overriddent ClassifierIcBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(sŌ 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()`` or ``classify_many()`` (or both) Subclasses may define: - either ``prob_classify()`` or ``prob_classify_many()`` (or both) cCs tƒ‚dS(ss :return: the list of category labels used by this classifier. :rtype: list of (immutable) N(tNotImplementedError(tself((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pytlabels)scCs0t|jƒr#|j|gƒdStƒ‚dS(se :return: the most appropriate label for the given featureset. :rtype: label iN(Rt classify_manyR(Rt featureset((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pytclassify0scCs0t|jƒr#|j|gƒdStƒ‚dS(s :return: a probability distribution over labels for the given featureset. :rtype: ProbDistI iN(Rtprob_classify_manyR(RR((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyt prob_classify:scCs g|D]}|j|ƒ^qS(są Apply ``self.classify()`` to each element of ``featuresets``. I.e.: return [self.classify(fs) for fs in featuresets] :rtype: list(label) (R(Rt featuresetstfs((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyREscCs g|D]}|j|ƒ^qS(sŋ Apply ``self.prob_classify()`` to each element of ``featuresets``. I.e.: return [self.prob_classify(fs) for fs in featuresets] :rtype: list(ProbDistI) (R (RR R ((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyROs(t__name__t __module__t__doc__RRR RR(((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyRs    tMultiClassifierIcBs;eZdZd„Zd„Zd„Zd„Zd„ZRS(sÞ A processing interface for labeling tokens with zero or more category labels (or "labels"). Labels are typically strs or ints, but can be any immutable type. The set of labels that the multi-classifier chooses from must be fixed and finite. Subclasses must define: - ``labels()`` - either ``classify()`` or ``classify_many()`` (or both) Subclasses may define: - either ``prob_classify()`` or ``prob_classify_many()`` (or both) cCs tƒ‚dS(ss :return: the list of category labels used by this classifier. :rtype: list of (immutable) N(R(R((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyRhscCs0t|jƒr#|j|gƒdStƒ‚dS(sr :return: the most appropriate set of labels for the given featureset. :rtype: set(label) iN(RRR(RR((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyRoscCs0t|jƒr#|j|gƒdStƒ‚dS(s‰ :return: a probability distribution over sets of labels for the given featureset. :rtype: ProbDistI iN(RRR(RR((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyR yscCs g|D]}|j|ƒ^qS(sķ Apply ``self.classify()`` to each element of ``featuresets``. I.e.: return [self.classify(fs) for fs in featuresets] :rtype: list(set(label)) (R(RR R ((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyR„scCs g|D]}|j|ƒ^qS(sŋ Apply ``self.prob_classify()`` to each element of ``featuresets``. I.e.: return [self.prob_classify(fs) for fs in featuresets] :rtype: list(ProbDistI) (R (RR R ((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyRŽs(R R RRRR RR(((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyRZs    N(Rtnltk.internalsRtobjectRR(((sc/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-FUwmDn/nltk/nltk/classify/api.pyts?