def setUp(self): super(TestClassifierWorker, self).setUp() self.cls = nltk.NaiveBayesClassifier.train([({'a': 'a', 'b': 'b'}, 'positive')]) self.data = [] for i in range(5): d = RawStreamQueue() d.source = 'test' d.original = {} d.text = "this is a test" self.data.append(d) ClassifiedStream.drop_collection()
def setUp(self): super(TestClassifierWorker, self).setUp() self.cls = nltk.NaiveBayesClassifier.train([({ 'a': 'a', 'b': 'b' }, 'positive')]) self.data = [] for i in range(5): d = RawStreamQueue() d.source = 'test' d.original = {} d.text = "this is a test" self.data.append(d) ClassifiedStream.drop_collection()
def tearDown(self): ClassifiedStream.drop_collection()
def tearDown(self): ClassifiedStream.drop_collection() RawStreamQueue.drop_collection()