(self)
| 66 | pass |
| 67 | |
| 68 | def test_find_tokens(self): |
| 69 | # Assert the default tokenizer and its optional parameters. |
| 70 | p = text.Parser() |
| 71 | v1 = p.find_tokens(u"Schrödinger's cat is alive!", punctuation="", replace={}) |
| 72 | v2 = p.find_tokens(u"Schrödinger's cat is dead!", punctuation="!", replace={"'s": " 's"}) |
| 73 | v3 = p.find_tokens(u"etc.", abbreviations=set()) |
| 74 | v4 = p.find_tokens(u"etc.", abbreviations=set(("etc.",))) |
| 75 | self.assertEqual(v1[0], u"Schrödinger's cat is alive!") |
| 76 | self.assertEqual(v2[0], u"Schrödinger 's cat is dead !") |
| 77 | self.assertEqual(v3[0], "etc .") |
| 78 | self.assertEqual(v4[0], "etc.") |
| 79 | print "pattern.text.Parser.find_tokens()" |
| 80 | |
| 81 | def test_find_tags(self): |
| 82 | # Assert the default part-of-speech tagger and its optional parameters. |
nothing calls this directly
no test coverage detected