-
Notifications
You must be signed in to change notification settings - Fork 4
Correctly find the IPA language code for sal-apa #790
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
Changes from all commits
c1eba30
36bb508
fa9a46a
3419832
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -95,6 +95,15 @@ def test_basic_g2p(self): | |
| with self.assertRaises(NotImplementedError): | ||
| get_g2p_engine("boop") | ||
|
|
||
| def test_unusual_ipa_code(self): | ||
| # sal-apa goes to sal-ipa instead of sal-apa-ipa | ||
| sal_apa_g2p = get_g2p_engine("sal-apa") | ||
| self.assertEqual(sal_apa_g2p("ac"), list("ats")) | ||
|
|
||
| # but iku-sro goes to iku-sro-ipa, not iku-ipa | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, why does this not go to
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we kind of assumed this *-ipa convention that isn't enforced
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Actually, the git logs tell me that's from back in 2019, with a commit log "first attempt at consolidating langs", so I'm going to guess this might have been an artefact of the merging process. We could change things in g2p, and probably we should add a function to the API that returns the IPA code for any non-IPA code that leads to IPA in a way or another. But my problem would remain that any such solution would be future only, it would not be compatible with older versions of g2p, hence my solution here. |
||
| iku_sro_g2p = get_g2p_engine("iku-sro") | ||
| self.assertEqual(iku_sro_g2p("akaq"), list("akaq")) | ||
|
|
||
| def test_phonemizer_normalization(self): | ||
| moh_g2p = get_g2p_engine("moh") | ||
| self.assertEqual(moh_g2p("\u00e9"), ["\u00e9"]) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to rebase onto main