Skip to content

Commit f9783d3

Browse files
authored
Update normalize.py
1 parent 022ecbd commit f9783d3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

pythainlp/util/normalize.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ def expand_maiyamok(sent: Union[str, List[str]]) -> List[str]:
255255
Expand Maiyamok.
256256
257257
Maiyamok (ๆ) (Unicode U+0E46) is a Thai character indicating word
258-
repetition. This function preprocesses Thai text by expanding Maiyamok
259-
258+
repetition. This function preprocesses Thai text by replacing
259+
Maiyamok with a word being repeated.
260260
261261
:param Union[str, List[str]] sent: input sentence (list or str)
262262
:return: list of words
@@ -265,9 +265,9 @@ def expand_maiyamok(sent: Union[str, List[str]]) -> List[str]:
265265
:Example:
266266
::
267267
268-
from pythainlp.util import maiyamok
268+
from pythainlp.util import expand_maiyamok
269269
270-
maiyamok("เด็กๆกิน")
270+
expand_maiyamok("เด็กๆกิน")
271271
# output: ['เด็ก', 'เด็ก', 'กิน']
272272
"""
273273
if isinstance(sent, str):
@@ -297,8 +297,11 @@ def maiyamok(sent: Union[str, List[str]]) -> List[str]:
297297
"""
298298
Expand Maiyamok.
299299
300+
Please use expand_maiyamok instead.
301+
300302
Maiyamok (ๆ) (Unicode U+0E46) is a Thai character indicating word
301-
repetition. This function preprocesses Thai text by expanding Maiyamok
303+
repetition. This function preprocesses Thai text by replacing
304+
Maiyamok with a word being repeated.
302305
303306
:param Union[str, List[str]] sent: input sentence (list or str)
304307
:return: list of words
@@ -307,9 +310,9 @@ def maiyamok(sent: Union[str, List[str]]) -> List[str]:
307310
:Example:
308311
::
309312
310-
from pythainlp.util import maiyamok
313+
from pythainlp.util import expand_maiyamok
311314
312-
maiyamok("เด็กๆกิน")
315+
expand_maiyamok("เด็กๆกิน")
313316
# output: ['เด็ก', 'เด็ก', 'กิน']
314317
"""
315318
warn_deprecation(

0 commit comments

Comments
 (0)