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
10 changes: 8 additions & 2 deletions pythainlp/util/phoneme.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,13 @@ def nectec_to_ipa(pronunciation: str) -> str:
"d":"d",
"f":"f",
"h":"h",
"j":"y",
# The conversion of j depends on its position in the syllable.
# But, unfortunately, the current implementation cannot handle both cases.
# To remove confusions without changing the behavior and breaking existing codes,
# it is suggested that the first key-value mapping of j be simply commented out,
# as it would be overridden by the second one and thus never take effect from the beginning.
# See #846 for a more detailed discussion: https://github.com/PyThaiNLP/pythainlp/issues/846
# "j":"y",
"k":"k",
"kʰ":"kh",
"l":"l",
Expand Down Expand Up @@ -198,7 +204,7 @@ def ipa_to_rtgs(ipa: str) -> str:
Docs: https://en.wikipedia.org/wiki/Help:IPA/Thai

:param str ipa: IPA phoneme
:return: The RTGS that is converted
:return: The RTGS that is converted, according to rules listed in the Wikipedia page
:rtype: str

:Example:
Expand Down