class _Classifier: def __init__(self, data): # self._classifier = NaiveBayesClassifier(data) self._classifier = MaxEntClassifier(data) def update(self, data): """ data needs to be an iterable(list or tuple) of iterables the inner iterable needs to be in the format of ('str', 'label') """ self._classifier.update(data) def probability(self, text): return self._classifier.prob_classify(text) def labels(self): return self._classifier.labels()