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

Incorrect transliteration for Japanese language #226

Open
AlexMisiulia opened this issue Jun 17, 2020 · 3 comments
Open

Incorrect transliteration for Japanese language #226

AlexMisiulia opened this issue Jun 17, 2020 · 3 comments

Comments

@AlexMisiulia
Copy link

AlexMisiulia commented Jun 17, 2020

Hi, thank you for your library!

I tried to transliterate this Japanese phrase:
今日の天気は良く見えません。

It should be (with the help of google translate):
Kyō no tenki wa yoku miemasen.

Actually it is:
Jin Rino Tian Qiha Liangku Jianemasen.

I am not good at Japanese at all. But maybe you can help to find some workaround or suggest another library that works well with Japanese. Thanks!

@AlexMisiulia AlexMisiulia changed the title Incorrect transliteration for japanese language Incorrect transliteration for Japanese language Jun 17, 2020
@dzcpy
Copy link
Owner

dzcpy commented Jun 18, 2020

Hi, thanks for using this liberary.
As you mentioned, this module doesn't work well with Japanese. It's due to the fact that Japanese and Chinese share a lot of characters (Kanji vs. Hanzi) so it is not able to differenciate the two languages. A lot of Japanese characters are transliterated as Chinese characters.
Another issue is that for each Japanese Kanji, they can be transliterated into different Romaji (Roman characters) in different sentences. So without doing a grammatical analysis, there's no way to accurately transliterate Japanese.
You may try something like kuroshiro module instead.
https://kuroshiro.org/#demo
(select "To: Romaji" and "Mode: Spaced")

@milesj
Copy link

milesj commented Aug 11, 2020

@dzcpy Could this be solved by explicitly passing the locale of the source text? transliterate('今日の天気は良く見えません。', { locale: 'ja' })

@dzcpy
Copy link
Owner

dzcpy commented Aug 11, 2020

@milesj Yes, that's one solution. However it doesn't solve the polyphone issue with Japanese

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

3 participants