예제 #1
0
 def test_apostrophe(self):
     self.assertEqual(separate("yīlù píng'ān"), ['yī lù', 'píng ān'])
예제 #2
0
 def test_you_er_yuan(self):
     self.assertEqual(separate("yòu'éryuán"), ["yòu ér yuán"])
예제 #3
0
 def test_ungrouped(self):
     with patch('chinese.transcribe.config', {'transcription': 'Pinyin'}):
         self.assertEqual(separate('hěn gāoxìng', grouped=False),
                          ['hěn', 'gāo', 'xìng'])
예제 #4
0
 def test_multisyllabic_words(self):
     with patch('chinese.transcribe.config', {'transcription': 'Pinyin'}):
         self.assertEqual(separate('túshūguǎn'), ['tú shū guǎn'])
예제 #5
0
 def test_muliple_words(self):
     with patch('chinese.transcribe.config', {'transcription': 'Pinyin'}):
         self.assertEqual(separate('hěn gāoxìng'), ['hěn', 'gāo xìng'])
예제 #6
0
 def test_tone_number(self):
     with patch('chinese.transcribe.config', {'transcription': 'Pinyin'}):
         self.assertEqual(separate('xian4zai4'), ['xian4 zai4'])
예제 #7
0
 def test_tone_mark(self):
     with patch('chinese.transcribe.config', {'transcription': 'Pinyin'}):
         self.assertEqual(separate('xiànzài'), ['xiàn zài'])