FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.05k stars 205 forks source link

[Feature Request] Kagome Support #1993

Open kirawi opened 2 years ago

kirawi commented 2 years ago

kagome is basically a Go port of kuromoji, which is basically a Java port of MeCab. It can be compiled to Wasm, which could be packaged along yomichan instead of requiring the user to manually install a tool like MeCab. I assume it will also be faster since it doesn't have to do any stdio with Python.

Ceynou commented 2 years ago

is 2021 unidic not signifiantly better than 2013 unidic mecab (used in kagome)?

kirawi commented 2 years ago

I think it uses the same version as the one used w/ MeCab as they're the same size (130 mb).

Ceynou commented 2 years ago

Yeah well I basically know nothing about coding/programming, if kagome doesn't replace the current implementation of mecab in yomichan then it's fine, because right now I use mecab with the newest unidic files, I just had to replace the unidic release repository link in install_mecab_for_yomichan.py with mine(426mb zip).

I didn't do any comparison but I have the feeling it was worst with the older unidic files, I wanted to know if you had any information on that

kirawi commented 2 years ago

I don't know, and it probably would just be added in addition to MeCab if it was accepted. I imagine you could easily update the Kagome dictionary though.

Edit: Yeah, it looks like it has a tool to do that, probably not trivial to do if you don't know programming.

toasted-nutbread commented 2 years ago

IMO including a large binary with Yomichan is probably not desirable, particularly if it's for an option which most users would not use. It might be feasible to set up as a second extension that functions as an addon for Yomichan, but at that point it could also just be a native extension in the same way that the MeCab component is.

Additionally, using web assembly in web extensions is likely to complicate the review process, if it's even possible in a cross-browser (and cross-manifest-version) manner.

kirawi commented 2 years ago

I believe ublock uses web assembly.

toasted-nutbread commented 2 years ago

The concern with extension storefronts is related to a potential degradation of the review process when a new release is created, which Yomichan has already had issues with in the past for Firefox. And as Chrome is moving towards a new extension model, I've seen issue reports concerning wasm as well, though I'm not sure if they're resolved.

https://groups.google.com/a/chromium.org/g/chromium-extensions/c/NB1Epp6Eoaw/m/Dmbunt53CAAJ https://bugs.chromium.org/p/chromium/issues/detail?id=1173354