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: check_marttra("จักร") returns "กน" #966

Open
bact opened this issue Nov 2, 2024 · 0 comments
Open

bug: check_marttra("จักร") returns "กน" #966

bact opened this issue Nov 2, 2024 · 0 comments
Labels
bug bugs in the library help wanted no contributor yet
Milestone

Comments

@bact
Copy link
Member

bact commented Nov 2, 2024

Description

check_marttra() method in pythainlp.khavee.KhaveeVerifier does not properly handel "กร" as a final consonant.

Expected results

check_marttra("จักร") returns "กก"

Current results

check_marttra("จักร") returns "กน"

See a run in PR #967 at https://github.com/PyThaiNLP/pythainlp/actions/runs/11641064036/job/32419112079?pr=967

Steps to reproduce

from pythainlp.khavee import KhaveeVerifier

kv = KhaveeVerifier()

kv.check_marttra("จักร")

PyThaiNLP version

5.0.4

More cases

All of these following test cases at

def test_check_marttra(self):
are failed.

        self.assertEqual(kv.check_marttra("ขำ"), "กม")
        self.assertEqual(kv.check_marttra("รมย์"), "กม")

        self.assertEqual(kv.check_marttra("ทัย"), "เกย")
        self.assertEqual(kv.check_marttra("ไทย"), "เกย")
        self.assertEqual(kv.check_marttra("ไกล"), "เกย")
        self.assertEqual(kv.check_marttra("ใกล้"), "เกย")

        self.assertEqual(kv.check_marttra("จักร"), "กก")

        self.assertEqual(kv.check_marttra("โยชน์"), "กด")

        self.assertEqual(kv.check_marttra("ยนต์"), "กน")
        self.assertEqual(kv.check_marttra("กรรณ"), "กน")
@bact bact added the bug bugs in the library label Nov 2, 2024
@bact bact added this to PyThaiNLP Nov 2, 2024
@bact bact moved this to To do in PyThaiNLP Nov 2, 2024
@bact bact added this to the 5.1 milestone Nov 2, 2024
@bact bact added the help wanted no contributor yet label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs in the library help wanted no contributor yet
Projects
Status: To do
Development

No branches or pull requests

1 participant