def test_match_feature(self): for s,v in self.basic_info.items(): seg = Segment(s) seg.specify(v) for feature, value in v.items(): for fv in ['+','-']: if fv == value: self.assertTrue(seg.feature_match([fv+feature])) self.assertTrue(seg.feature_match(fv+feature)) else: self.assertTrue(not seg.feature_match([fv+feature]))
def test_match_feature(self): for s, v in self.basic_info.items(): seg = Segment(s) seg.specify(v) for feature, value in v.items(): for fv in ['+', '-']: if fv == value: self.assertTrue(seg.feature_match([fv + feature])) self.assertTrue(seg.feature_match(fv + feature)) else: self.assertTrue(not seg.feature_match([fv + feature]))
def test_no_syllabic_feature(): seg = Segment('') seg.specify({'feature1':'+','feature2':'+'})
def test_no_syllabic_feature(): seg = Segment('') seg.specify({'feature1': '+', 'feature2': '+'})