def classify(self, featureset): """ @return: the most appropriate label for the given featureset. @rtype: label """ if overridden(self.batch_classify): return self.batch_classify([featureset])[0] else: raise NotImplementedError()
def prob_classify(self, featureset): """ @return: a probability distribution over labels for the given featureset. @rtype: L{ProbDistI <nltk.probability.ProbDistI>} """ if overridden(self.batch_prob_classify): return self.batch_prob_classify([featureset])[0] else: raise NotImplementedError()