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

Mistaken ruby generation by ttlig.py's from_furi #38

Open
passaglia opened this issue May 22, 2023 · 0 comments
Open

Mistaken ruby generation by ttlig.py's from_furi #38

passaglia opened this issue May 22, 2023 · 0 comments

Comments

@passaglia
Copy link

ttlig.py's from_furi method fails on words that contain kanji, end with kana, and where the ending kana is same as the last kana of the preceding kanji.
e.g.:

可愛い (かわいい)
憎く (にくく)
低く (ひくく)

from speach import ttlig
ttlig.RubyToken.from_furi(surface='可愛い',kana='かわいい').to_code()
# it returns {可愛/かわ}い
# but the correct result should be {可愛/かわい}い

@larvata pointed this out downstream in a yomikata issue. I fixed this in yomikata by stripping surface and kana of trailing overlapping trailing characters before running them through the main logic, a pretty ugly hack.

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

1 participant