Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tchayintr opened this issue May 16, 2024 · 2 comments · Fixed by #917
Closed
Assignees
Labels
bug bugs in the library

Comments

@tchayintr
Copy link

tchayintr commented May 16, 2024

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

Copy link

Hello @tchayintr, thank you for your interest in our work!

If this is a bug report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

@bact
Copy link
Member

bact commented May 16, 2024

Thanks. I agree. It should repeat the word as many as the number of maiyamok.

@wannaphong wannaphong added the bug bugs in the library label May 29, 2024
@wannaphong wannaphong self-assigned this May 29, 2024
wannaphong added a commit that referenced this issue May 29, 2024
wannaphong added a commit that referenced this issue Jun 1, 2024
wannaphong added a commit that referenced this issue Jun 2, 2024
## What's Changed
* Fixed #914 by @wannaphong in #917

**Full Changelog**: v5.0.3...v5.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs in the library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants