JL i<dZddlmZGddZGddZy)a 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. ) overriddenc.eZdZdZdZdZdZdZdZy) ClassifierIa 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) ctzs :return: the list of category labels used by this classifier. :rtype: list of (immutable) NotImplementedErrorselfs W/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/nltk/classify/api.pylabelszClassifierI.labels+ "##cjt|jr|j|gdSt)ze :return: the most appropriate label for the given featureset. :rtype: label rr classify_manyr r featuresets r classifyzClassifierI.classify23 d(( )%%zl3A6 6%' 'rcjt|jr|j|gdSt)z :return: a probability distribution over labels for the given featureset. :rtype: ProbDistI rrprob_classify_manyr rs r prob_classifyzClassifierI.prob_classify<3 d-- .**J<8; ;%' 'rcJ|Dcgc]}|j|c}Scc}w)z Apply ``self.classify()`` to each element of ``featuresets``. I.e.: return [self.classify(fs) for fs in featuresets] :rtype: list(label) rr featuresetsfss r rzClassifierI.classify_manyG!-88b b!888 cJ|Dcgc]}|j|c}Scc}wz Apply ``self.prob_classify()`` to each element of ``featuresets``. I.e.: return [self.prob_classify(fs) for fs in featuresets] :rtype: list(ProbDistI) rrs r rzClassifierI.prob_classify_manyQ#2==2""2&===r"N __name__ __module__ __qualname____doc__r rrrrrr rr  $( (9>rrc.eZdZdZdZdZdZdZdZy)MultiClassifierIa 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) ctrrr s r r zMultiClassifierI.labelskrrcjt|jr|j|gdSt)zr :return: the most appropriate set of labels for the given featureset. :rtype: set(label) rrrs r rzMultiClassifierI.classifyrrrcjt|jr|j|gdSt)z :return: a probability distribution over sets of labels for the given featureset. :rtype: ProbDistI rrrs r rzMultiClassifierI.prob_classify|rrcJ|Dcgc]}|j|c}Scc}w)z Apply ``self.classify()`` to each element of ``featuresets``. I.e.: return [self.classify(fs) for fs in featuresets] :rtype: list(set(label)) rrs r rzMultiClassifierI.classify_manyr!r"cJ|Dcgc]}|j|c}Scc}wr$r%rs r rz#MultiClassifierI.prob_classify_manyr&r"Nr'r,rr r/r/\r-rr/N)r+nltk.internalsrrr/r,rr r6s$ &=>=>@=>=>r