コード例 #1
0
 def test_getFeatures(self):
     result = SimpleProcessor.getFeatures(SimpleProcessor.clean(self.text))
     expect = {'timor': 1, 'is': 1, 'my': 1, 'hello': 1, 'name': 1}
     self.assertEqual(expect, result)
コード例 #2
0
 def test_clean(self):
     result = SimpleProcessor.clean(self.text)
     expect = "hello my name is timor"
     self.assertEqual(expect, result)
コード例 #3
0
 def test_getClassifierTokens(self):
     result = SimpleProcessor.getClassifierTokens(
         SimpleProcessor.clean(self.text))
     expect = "hello my name is timor".split()
     self.assertEqual(expect, result)
コード例 #4
0
 def test_getClassifierTokens(self):
     result = SimpleProcessor.getClassifierTokens(self.text)
     expect = set("hello my name is timor".split())
     self.assertEqual(expect, result)
コード例 #5
0
 def test_clean(self):
     result = SimpleProcessor.clean(self.text)
     expect = "hello my name is timor"
     self.assertEqual(expect, result)
コード例 #6
0
 def test_getFeatures(self):
     result = SimpleProcessor.getFeatures(SimpleProcessor.clean(self.text))
     expect = {'timor': 1, 'is': 1, 'my': 1, 'hello': 1, 'name': 1}
     self.assertEqual(expect, result)
コード例 #7
0
 def test_getSearchTokens(self):
     result = SimpleProcessor.getSearchTokens(SimpleProcessor.clean(self.text))
     expect = "hello my name is timor".split()
     self.assertEqual(expect, result)