Skip to content

bug: pythainlp.util.maiyamok does not duplicate words when more than one Maiyamok is used #914

@tchayintr

Description

@tchayintr

Description

Hello.

I am not sure whether maiyamok matches the maintainer's intention.

Although using more than one Maiyamok may be inappropriate in formal writing, should it still align with the function of Maiyamok by resulting in the duplication of the word according to the number of Maiyamok?

Then leave post-processing (or pre-processing) to developers.

Expected results

['เด็ก', 'เด็ก', 'เด็ก', 'ชอบ', 'ไป', 'โรงเรียน']

Current results

['เด็ก', '', '', 'ชอบ', 'ไป', 'โรงเรียน']

Steps to reproduce

from pythainlp.util import maiyamok
maiyamok("เด็กๆๆชอบไปโรงเรียน")
>>> ['เด็ก', '', '', 'ชอบ', 'ไป', 'โรงเรียน']

PyThaiNLP version

5.0.2

Python version

3.10.14

Operating system and version

Ubuntu 18.04.6 LTS

More info

No response

Possible solution

No response

Files

No response

Metadata

Metadata

Assignees

Labels

bugbugs in the library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions