def classify_text(self, text): if not hasattr(self, 'classifiers'): self.train() # Extract keywords like we do when learning c = ClassificationObject() c.text = text c.process() return self.classify(c)
def save_classification_object(line, tags): c = ClassificationObject() c.text = line c.process() c.tags = tags c.save()
def save_classification_object(line, tags): c = ClassificationObject() c.text = line c.process() c.tags = tags c.save()