birchill / 10ten-ja-reader

A browser extension to translate Japanese by hovering over words.
https://addons.mozilla.org/firefox/addon/10ten-ja-reader/
GNU General Public License v3.0
610 stars 45 forks source link

Definitions in Japanese #504

Open arBalasquide opened 3 years ago

arBalasquide commented 3 years ago

Hello, I would like to get the definitions of words in Japanese rather than English (or the other available options). What files in this repo handle the fetching of the definition? Since theres support for other language, I assume its rather feasible to do this so any pointers on how to achieve this would be appreciated. Thank you in advance.

birtles commented 3 years ago

Hi! I'm afraid it's not quite so simple to add other dictionaries, but I would love to do it. Do you know of a freely available J-J dictionary?

arBalasquide commented 3 years ago

Hi! I'm afraid it's not quite so simple to add other dictionaries, but I would love to do it. Do you know of a freely available J-J dictionary?

I see, I tried reading the source code but couldn't figure it out lol. I can only think of this one: https://dictionary.goo.ne.jp/ Is there a specific format you need the dictionary to be?

birtles commented 3 years ago

I see, I tried reading the source code but couldn't figure it out lol. I can only think of this one: https://dictionary.goo.ne.jp/ Is there a specific format you need the dictionary to be?

Yeah, unfortunately that's using デジタル大辞泉 which, as far as I know, isn't free. I have a long-term plan to support this, but it's pretty long term.

arBalasquide commented 3 years ago

Yeah, unfortunately that's using デジタル大辞泉 which, as far as I know, isn't free. I have a long-term plan to support this, but it's pretty long term.

I tried looking for one and it seems all are proprietary. However, perhaps maybe it would be best for the long term to make it easier to add dictionaries to then add a feature where users can import their own custom dictionary?

Kala-J commented 3 years ago

It's been mentioned before, but the Japanese wiktionary is pretty extensive. However, it is definitely lacking when it comes to expressions. For example, 道草を食う doesn't have its own entry (it is listed without a definition under the idioms section of くう), while デジタル大辞泉 has an entry with definition.

https://ja.wiktionary.org/wiki/くう (You can get a sense of the state of affairs with the red links in the compounds/idioms sections, and compare with rikaichamp to see that most of them are in the J-E dictionary.)

I don't think it is available in an easily workable and parseable format, either.