Example #1
0
    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)
Example #2
0
def save_classification_object(line, tags):
    c = ClassificationObject()
    c.text = line
    c.process()
    c.tags = tags
    c.save()
Example #3
0
def save_classification_object(line, tags):
    c = ClassificationObject()
    c.text = line
    c.process()
    c.tags = tags
    c.save()