themoeway / yomitan

Japanese pop-up dictionary browser extension. Successor to Yomichan.
https://chromewebstore.google.com/detail/yomitan/likgccmbimhjbgkjambclfkhldnlhbnn
GNU General Public License v3.0
933 stars 71 forks source link

Rework kanji terms to work more like regular terms #596

Open stephenmk opened 5 months ago

stephenmk commented 5 months ago

After scanning a word, Yomitan very conveniently allows you to click on the kanji used within the word and jump to those kanji definition pages.

yomu

The current kanji definition format was designed with the assumption that users would never have kanji dictionaries other than the 'kanjidic for yomichan' dictionary produced by Yomichan-Import. For example, people have made different kanji dictionaries using data from sources like Wiktionary and JPDB. These dictionaries had to be painstakingly shoehorned to fit Yomichan's kanji entry format.

It would be much nicer if kanji terms were allowed to use the same structured content features as regular terms. Naturally there's nothing stopping people from making kanji dictionaries using the regular term format, but then the convenient click functionality that I mentioned above is lost. These sorts of kanji term entries get mixed with regular term entries and become harder to find.

MarvNC commented 5 months ago

I think we could just abandon the current kanji term bank format, and automatically take entries from term banks that have a cjk character headword and no reading to be used as kanji dictionaries instead (or add a new boolean array item for whether the term is a kanji term or not). This would allow for existing dictionaries with structured content kanji entries to be used with no or minimal effort.