示例#1
0
    def clean_new_trans_test(self):
        orig = '"I don\'t understand any of it; I don\'t understand it at all"'
        expected = " I don\'t understand any of it; I don\'t understand it at all "
        result = clean_trans_string(orig)

        self.assertEqual(result, expected)

        tokenized          = tokenize_string(result, tokenizer=sentence_tokenizer).text()
        tokenized_expected = "I don't understand any of it ; I don't understand it at all"
        self.assertEqual(tokenized, tokenized_expected)
示例#2
0
 def clean_trans_test(self):
     result = "             I read her article.'                     `I read one of her articles  "
     self.assertEqual(clean_trans_string(self.l3), result)