예제 #1
0
 def test_tag_does_not_replace_non_synonym(self):
     " tag does not replaces a synonym "
     self.assertEquals(replace_synonyms_with_tags(['notsynonym']),
         [u'notsynonym'])
     self.assertEquals(replace_synonyms_with_tags(
         ['notsynonym',self.prestxt]),[u'notsynonym',self.prestxt])
예제 #2
0
 def test_tag_replaces_synonym(self):
     " tag replaces a synonym "
     self.assertEquals(replace_synonyms_with_tags(['president']),
         [self.prestxt])
     self.assertEquals(replace_synonyms_with_tags(['president','obama']),
         [self.prestxt,self.prestxt])