Пример #1
0
 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]))
Пример #2
0
 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]))
Пример #3
0
def test_no_syllabic_feature():
    seg = Segment('')
    seg.specify({'feature1':'+','feature2':'+'})
Пример #4
0
def test_no_syllabic_feature():
    seg = Segment('')
    seg.specify({'feature1': '+', 'feature2': '+'})