|
17 | 17 | analyze_thai_text, |
18 | 18 | arabic_digit_to_thai_digit, |
19 | 19 | bahttext, |
20 | | - check_khuap_klam, |
21 | 20 | collate, |
22 | 21 | convert_years, |
23 | 22 | count_thai_chars, |
|
50 | 49 | reorder_vowels, |
51 | 50 | sound_syllable, |
52 | 51 | spell_syllable, |
53 | | - spell_word, |
54 | 52 | spelling, |
55 | 53 | syllable_length, |
56 | 54 | syllable_open_close_detector, |
|
64 | 62 | thai_strftime, |
65 | 63 | thai_strptime, |
66 | 64 | thai_to_eng, |
67 | | - thai_word_tone_detector, |
68 | 65 | thaiword_to_date, |
69 | 66 | thaiword_to_num, |
70 | 67 | thaiword_to_time, |
@@ -1058,24 +1055,6 @@ def test_analyze_thai_text(self): |
1058 | 1055 | {'สระ เอ': 1, 'ล': 1, 'ไม้เอก': 1, 'น': 1} |
1059 | 1056 | ) |
1060 | 1057 |
|
1061 | | - # ### pythainlp.util.khuap_klam |
1062 | | - |
1063 | | - def test_check_khuap_klam(self): |
1064 | | - # true consonant clusters (คำควบกล้ำแท้) |
1065 | | - self.assertTrue(check_khuap_klam("กราบ")) |
1066 | | - self.assertTrue(check_khuap_klam("ปลา")) |
1067 | | - self.assertTrue(check_khuap_klam("เพราะ")) |
1068 | | - # false consonant clusters (คำควบกล้ำไม่แท้) |
1069 | | - self.assertFalse(check_khuap_klam("จริง")) |
1070 | | - self.assertFalse(check_khuap_klam("ทราย")) |
1071 | | - # not a cluster |
1072 | | - self.assertIsNone(check_khuap_klam("แม่")) |
1073 | | - self.assertIsNone(check_khuap_klam("ตา")) |
1074 | | - # edge cases |
1075 | | - self.assertIsNone(check_khuap_klam("")) |
1076 | | - for word in ["กลม", "จริง", "ตา"]: |
1077 | | - self.assertIn(check_khuap_klam(word), (True, False, None)) |
1078 | | - |
1079 | 1058 | # ### pythainlp.util.pronounce |
1080 | 1059 |
|
1081 | 1060 | def test_thai_consonant_to_spelling(self): |
@@ -1107,29 +1086,6 @@ def test_spell_syllable(self): |
1107 | 1086 | self.assertGreater(len(result_kon), 0) |
1108 | 1087 | self.assertIn("คน", result_kon) |
1109 | 1088 |
|
1110 | | - def test_spell_word(self): |
1111 | | - self.assertEqual(spell_word(None), []) |
1112 | | - self.assertEqual(spell_word(""), []) |
1113 | | - result = spell_word("คน") |
1114 | | - self.assertIsInstance(result, list) |
1115 | | - self.assertIn("คน", result) |
1116 | | - # multi-syllable: last element is the full word |
1117 | | - result_multi = spell_word("คนดี") |
1118 | | - self.assertEqual(result_multi[-1], "คนดี") |
1119 | | - |
1120 | | - # ### pythainlp.util.thai – thai_word_tone_detector |
1121 | | - |
1122 | | - def test_thai_word_tone_detector(self): |
1123 | | - self.assertEqual(thai_word_tone_detector(None), []) |
1124 | | - self.assertEqual(thai_word_tone_detector(""), []) |
1125 | | - result = thai_word_tone_detector("คนดี") |
1126 | | - self.assertIsInstance(result, list) |
1127 | | - valid_tones = {"l", "m", "h", "r", "f", ""} |
1128 | | - for syllable, tone in result: |
1129 | | - self.assertIsInstance(syllable, str) |
1130 | | - self.assertIn(tone, valid_tones) |
1131 | | - self.assertIsInstance(thai_word_tone_detector("มือถือ"), list) |
1132 | | - |
1133 | 1089 | # ### pythainlp.util.normalize – remove_repeat_vowels, |
1134 | 1090 | # remove_spaces_before_marks, reorder_vowels |
1135 | 1091 |
|
|
0 commit comments