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

Japanese solutions display standalone hiragana as katakana #197

Open
stochaztic opened this issue May 4, 2023 · 7 comments
Open

Japanese solutions display standalone hiragana as katakana #197

stochaztic opened this issue May 4, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@stochaztic
Copy link

Solutions in Japanese are displaying all "standalone" hiragana as katakana, as shown in the first image below. The expected hiragana answers are not in the solution list at all. The only hiragana shown are kanji replacements. This highly reduces the usefulness of the Japanese solution list; while using katakana instead of hiragana everywhere is technically permissible in Duolingo, it is not at all how the language is used, and makes reading or filtering the solution list extremely hard.

I am unsure when this started happening, as it was not the case when I used this extension regularly many months ago. As noted in the second image, the data in compact_translations in the https://excess.duolingo.com/batch at question submission time does not show katakana. I was not sucessful diving deeper to try to find the cause of the issue in my cursory attempt.

image
image

@blmage
Copy link
Owner

blmage commented May 11, 2023

Thanks for the heads up!

The solutions are currently extracted from the "grader" graph, as I originally wanted to have maximum completeness, but one of the goals when I started working on v5 a while ago (before life and other projects caught up with me) was actually to switch to using the "compact translations" instead.

If I remember well, most of the code related to this was ready to test, so I should be able to reuse it in v4, even if only to parse Japanese solutions. Would you be willing to test a pre-release of the extension, and let me know if everything looks good, and/or if anything could be improved (especially regarding the Japanese course)?

@blmage blmage self-assigned this May 11, 2023
@blmage blmage added the enhancement New feature or request label May 11, 2023
@stochaztic
Copy link
Author

stochaztic commented May 11, 2023 via email

@blmage
Copy link
Owner

blmage commented May 29, 2023

Sorry for the delay! it took a little longer than I expected, especially because I wanted to give a try to the syllabary filter (the extension now uses Wanakana.js to automatically convert between syllabaries, using the compact translations as the basis).

Version 4.13.0-beta.1 can be downloaded here and loaded as-is in your browser, if you want to give it a try.

Thanks!

@blmage
Copy link
Owner

blmage commented Sep 28, 2023

The changes mentioned are now part of version 4.14.0.

If and when you have some time, your feedback would be greatly appreciated!

@stochaztic
Copy link
Author

Sorry I wasn't able to get to this in the beta. I'm still experiencing this issue on the Chrome Web Store release of 4.14.0.
image

@blmage
Copy link
Owner

blmage commented Sep 30, 2023

No worries, thank you very much for taking the time to give it a try!

The compactTranslations are actually not always available, which is probably why the extension fell back to using the graph, but until now I thought this was only the case for fill-in-the-blank challenges - maybe this is more common on the Japanese course than the others.

I'll try to implement the syllabary filter for solutions parsed from graphs as well, then, hopefully it won't be too costly in terms of performance. I guess I'll have to fix and rethink it first, though, as it doesn't seem to work quite as expected when applied to the compactTranslations, in addition to not being very useful (or at least quite confusing) in its current state.

@blmage
Copy link
Owner

blmage commented Oct 2, 2023

Just wanted to give you a quick update since I just tested the new filter on a list of 72k solutions, and using it to exclude katakana tokens removed 99.5% of them. Also, adding the flag to all solutions seems to be a sweet spot for memoization, as it took only a fraction of the total time (if the profiler is to be trusted, at least).

All that's left then is to integrate it back into the UI!

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

No branches or pull requests

2 participants