Example #1
0
 def process(self, context, word_string):
     YLogger.debug(context, "Removing punctuation...")
     return TextUtils.strip_all_punctuation(word_string)
Example #2
0
 def test_strip_all_punctuation(self):
     self.assertEquals("", TextUtils.strip_all_punctuation(""))
     self.assertEquals("", TextUtils.strip_all_punctuation(" "))
     self.assertEquals("x y z", TextUtils.strip_all_punctuation("x! y? z."))
     self.assertEquals("a b c", TextUtils.strip_all_punctuation("!a b c?"))