Skip to content

Fixes: #219 typo in Japanese post rules - #220

Merged
dmort27 merged 2 commits into
dmort27:masterfrom
massimolipari:master
Oct 16, 2025
Merged

Fixes: #219 typo in Japanese post rules#220
dmort27 merged 2 commits into
dmort27:masterfrom
massimolipari:master

Conversation

@massimolipari

@massimolipari massimolipari commented May 2, 2025

Copy link
Copy Markdown
Contributor
  • What kind of change does this PR introduce? (Language addition, bug fix, feature, docs update, ...)

Bug fix, fixes: #219. Changed u to ɯ in one rule in both data/post/jpn-Hira.txt and data/post/jpn-Kana.txt.

  • What is the current behavior? (You can also link to an open issue here)

See #219: words like とうきょう/トウキョウ are incorrectly transcribed as /toukʲou/ rather than /toːkʲoː/.

  • What is the new behavior (if this is a feature change)?

See above.

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

This will have a substantial effect on output transcriptions.

Changed `u` to `ɯ` in one rule in both `data/post/jpn-Hira.txt` and `data/post/jpn-Kana.txt`.
@massimolipari massimolipari changed the title Fixes typo in Japanese post rules Fixes: #219 typo in Japanese post rules May 2, 2025
@juice500ml

Copy link
Copy Markdown
Collaborator

Hi, thanks a lot for your efforts! If it's possible, can you add the aforementioned Tokyo example as a test case? Thanks!

@massimolipari

Copy link
Copy Markdown
Contributor Author

It doesn't seem like there's a test file for Japanese yet, is there any documentation on how to set one up? (Especially since there's three different scripts)

@juice500ml

Copy link
Copy Markdown
Collaborator

Thanks!! There's no documentation yet, but a good example will be https://github.com/dmort27/epitran/blob/master/epitran/test/test_slovene.py or https://github.com/dmort27/epitran/blob/master/epitran/test/test_finnish.py

The test file's name should always be "test_something.py", in this case, "test_japanese.py" at that folder.

@juice500ml

Copy link
Copy Markdown
Collaborator

FYI, you pushed bunch of Turkish in this PR!

@massimolipari

Copy link
Copy Markdown
Contributor Author

Whoops, sorry, that commit was meant for my fork!

@massimolipari

Copy link
Copy Markdown
Contributor Author

I've tried adding a test file, but I'm not sure if I've done it right. I couldn't tell from the example files how to go about adding tests for multiple scripts (should they be in separate files?), so I've only done the Hiragana case for now.

@juice500ml

Copy link
Copy Markdown
Collaborator

You can do something similar like: https://github.com/dmort27/epitran/blob/master/epitran/test/test_slovene.py#L25-L39
It doesn't have to be that many, but there should be adequate number of sample cases that can check the sanity.

@dmort27 dmort27 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, these look good.

@dmort27
dmort27 merged commit f837c01 into dmort27:master Oct 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typo in Japanese post rules

3 participants