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

Problem with 'fra-Latn' for some words #87

Open
pierebean opened this issue Aug 26, 2021 · 3 comments
Open

Problem with 'fra-Latn' for some words #87

pierebean opened this issue Aug 26, 2021 · 3 comments

Comments

@pierebean
Copy link

'C'est une belle' gives 'k'ɛst ynə bɛlə' which is incorrect for 'C'est' is pronounced 'se'.

'Russe blanc' gives 'rysə blank' which is incorrect for 'blanc' is pronounced 'blɑ̃'.

epitran.Epitran('fra-Latn').transliterate('C\'est un russe blanc')
Out[76]: "k'ɛst yn rysə blank"
@digitalheir
Copy link

Also, the test for 'expansion' (expected 'ɛkspɑ̃sjɔ̃', is 'ɛkspâsjɔ̃') fails.

The mapping ẫ,â is made because it's longer than â,ɑ. Is it intentional? Then test_french.py should be updated.

@martino-vic
Copy link
Contributor

epitran is a rule based transcriber so for some languages it works better than for others. The older an orthography the more complicated the rules and the worse epitran works. That's also why the English transcription is based on a third party library that uses a grapheme2phoneme (short: g2p) AI model. See here for an example. The French orthography is also old with complicated rules, so the best way to transcribe it is to use something like e-speak-ng (supports even transcription of Belgian and Swiss French!). The disadvantage of g2p models is that you need a considerably large amount of data to train your AI model. Since, however, the vast majority of languages in the world is underdocumented and has a rather young orthography with simple rules, epitran is still extremely useful.

@X-Ryl669
Copy link

From my own tests, it seems you need to:

  1. Split your sentences in words (see The same word is transliterated differently #61 remark where it's said that Epitran is designed to transliterate only words)
  2. Remove any punctuation mark. If you try "Cest un russe blanc", you'll get "s œ̃ rysə blɑ̃" (which is close to se œ̃ ʀys blã)
  3. Yet, small word like articles don't work either if alone ("te" gives "t" and not "tə" and "cest" gives "s" and not "se") but work well if coupled with noun (why?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants