From 55d957584a95c8e37d378a3f0ca42f3c42b97cfc Mon Sep 17 00:00:00 2001 From: Arthit Suriyawongkul Date: Sun, 23 Jun 2024 15:31:22 +0100 Subject: [PATCH] Update tone_detector() API description Update API description on what each return symbol means http://www.thai-language.com/ref/tone-rules --- pythainlp/util/syllable.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pythainlp/util/syllable.py b/pythainlp/util/syllable.py index ef0a31f2f..57f0c68ab 100644 --- a/pythainlp/util/syllable.py +++ b/pythainlp/util/syllable.py @@ -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: