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

[BUG] Mecab not set #182

Closed
wants to merge 16 commits into from
Closed

Conversation

ProgramComputer
Copy link

@ProgramComputer ProgramComputer commented Jan 3, 2024

@HugoFara
From #155,

I added a new parameter word_parsing (on LWT_DATA.language). That should be a more flexible way to address the issue. For now I don't want to touch the TTS feature any more since it already underwent a massive change with #153, and I don't see bugs for now...

Screenshot 2024-01-02 181512

The bug still exists in c2cb13b. I changed the PR to accommodate the #153. Test or @ProgramComputer for me to test before closing.

Lang_id allows setting mecab independent from language.

Reproduce:

Install LWT.
Do not install mecab and don't set "mecab" in regex setting.
Open a Japanese text.

@HugoFara HugoFara added the bug Something isn't working label Jan 4, 2024
HugoFara added a commit that referenced this pull request Jan 5, 2024
HugoFara added a commit that referenced this pull request Jan 5, 2024
Fixes many small parts of the code not collaborating with each other.
@HugoFara HugoFara closed this in 4d6b109 Jan 5, 2024
HugoFara added a commit that referenced this pull request Jan 5, 2024
Progresses on #167: SYSTEM_ADMIN_VARIABLE no longer required for texts reparsing.
Closes #182: MeCab won't for TTS if not necessary.
@HugoFara
Copy link
Owner

HugoFara commented Jan 5, 2024

Hi, I looked at your changes and they were valid but they implied many changes in function signatures. I was also not satisfied with my own previous code relying on global JS variables, as they is always a point where they become messy.

So I changed the signature of speechDispatcher to take a language ID as argument (your suggestion) and I create a new API enpoint (/languages/{lang-id}/reading-configuration) to return the valid data. Now speech dispatcher just asks the server how to read a term.

The supplementary overhead is contained as well: ~500 B and 50ms on average. It supports caching as well, so it won't be concerning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants