Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pythainlp/util/syllable.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,17 @@ def tone_detector(syllable: str) -> str:
"""
Thai tone detector for syllables

Return tone of a syllable.

- l: low
- m: mid
- r: rising
- f: falling
- h: high
- empty string: cannot be detected

:param str syllable: Thai syllable
:return: syllable's tone (l, m, h, r, f or empty if it cannot be detected)
:return: syllable's tone (l, m, h, r, f) or empty if it cannot be detected
:rtype: str

:Example:
Expand Down