Skip to content

Commit 55d9575

Browse files
authored
Update tone_detector() API description
Update API description on what each return symbol means http://www.thai-language.com/ref/tone-rules
1 parent adc6967 commit 55d9575

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pythainlp/util/syllable.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,17 @@ def tone_detector(syllable: str) -> str:
212212
"""
213213
Thai tone detector for syllables
214214
215+
Return tone of a syllable.
216+
217+
- l: low
218+
- m: mid
219+
- r: rising
220+
- f: falling
221+
- h: high
222+
- empty string: cannot be detected
223+
215224
:param str syllable: Thai syllable
216-
:return: syllable's tone (l, m, h, r, f or empty if it cannot be detected)
225+
:return: syllable's tone (l, m, h, r, f) or empty if it cannot be detected
217226
:rtype: str
218227
219228
:Example:

0 commit comments

Comments
 (0)