Back

Yomichan (JP dictionary for Chrome/Firefox + EPWING + auto flashcards)

(2016-08-11, 10:23 am)gaiaslastlaugh Wrote: Just confirmed that add to Anki works fine for me. If Anki has been idle for a while, you might need to bring it to the foreground to wake up the listener thread. Also, on longer words, there can be a delay; it looks like Yomichan does a search to determine whether or not a word already exists in your Anki deck to decide whether to activate the Anki button.

I like the new display format!!

Yeah, the delay has always been there. AnkiConnect processes requests on a timer; making the timer fire too frequently makes the CPU usage go up noticeably. My reasoning is that a ~1 second delay is not too big of a problem in real world usage, compared to making the battery on somebody's laptop drain quickly.
Reply
(2016-08-11, 10:25 am)gaiaslastlaugh Wrote: What's the status on J-J dictionary support via EDICT format? It would be great to be able to source both J-J and J-E definitions from Yomichan, though I admit I'm not quite sure how that'd work from a UI perspective...


There are a couple of things I have to figure out:
  • I am not aware of any free J-J dictionaries that could be bundled with Yomichan. If I am missing something and there is a J-J EDICT out there somewhere, it could be added with minimal amount of effort.
  • If the dictionary is not free, what is the mechanism for side-loading it? Chrome extensions are fairly self-contained and you can’t just say “oh, use the dictionary file on my desktop!”. Format conversion also has to happen at some point.
Edited: 2016-08-11, 1:03 pm
Reply
I believe epwing to anki is bundled with at least one j-j dictionary (Sorry I'm not at home to verify).   If that's true, presumably the dictionary is free...?
Reply
May 15 - 26: Pretty Big Deal: Get 31% OFF Premium & Premium PLUS! CLICK HERE
JapanesePod101
(2016-08-11, 1:22 pm)yogert909 Wrote: I believe epwing to anki is bundled with at least one j-j dictionary (Sorry I'm not at home to verify).   If that's true, presumably the dictionary is free...?

I'll take a look when I get home, but it looks like the first couple of posts are of people asking where to get dictionaries.
Reply
(2016-08-11, 1:51 pm)FooSoft Wrote:
(2016-08-11, 1:22 pm)yogert909 Wrote: I believe epwing to anki is bundled with at least one j-j dictionary (Sorry I'm not at home to verify).   If that's true, presumably the dictionary is free...?

I'll take a look when I get home, but it looks like the first couple of posts are of people asking where to get dictionaries.

I'm pretty sure there aren't any free EPWING dictionaries. At least, there's little reason to use the format unless you're an established Japanese publisher who's been doing it for years.

@FooSoft, thanks for this lovely software, I use it every day. Would like to suggest 2 things for your consideration:
  • The individual definitions (glosses) from JMDict shown aren't grouped by senses. In JMDict, they are, because each group of glosses is a cluster of synonyms. How about displaying them grouped the same way, to simplify learning? I'd love for this to be output as {glossary-list} in AnkiConnect. Example of how grouped glosses might look:

    Quote:練る; 煉る
    1.  [v5r,vt]  to knead; to thicken into a paste (stirring over a flame)
    2.  [v5r,vt]  to polish (a plan, etc.); to refine; to elaborate; to work out
    3.  [v5r,vt]  to train; to drill; to exercise
    4.  (練る only) [v5r,vt] to gloss (silk); to soften; to degum

  • One thing I miss from Rikaisama is the frequency rank that it can output for each word. This helps me decide whether I should export the definition to Anki (I tend not to export uncommon words). Maybe Yomichan could potentially consider displaying this in the future, though the work might be slightly involved. Rikaisama uses the 5,000+ novel (Innocent?) corpus, while Aedict3 uses the Kamermans and Matsushita frequency lists.
Thanks for listening!
Edited: 2016-08-12, 6:24 am
Reply
(2016-08-12, 4:44 am)creamyhorror Wrote:
(2016-08-11, 1:51 pm)FooSoft Wrote:
(2016-08-11, 1:22 pm)yogert909 Wrote: I believe epwing to anki is bundled with at least one j-j dictionary (Sorry I'm not at home to verify).   If that's true, presumably the dictionary is free...?

I'll take a look when I get home, but it looks like the first couple of posts are of people asking where to get dictionaries.

I'm pretty sure there aren't any free EPWING dictionaries. At least, there's little reason to use the format unless you're an established Japanese publisher who's been doing it for years.

@FooSoft, thanks for this lovely software, I use it every day. Would like to suggest 2 things for your consideration:
  • The individual definitions (glosses) from JMDict shown aren't grouped by senses. In JMDict, they are, because each group of glosses is a cluster of synonyms. How about displaying them grouped the same way, to simplify learning? I'd love for this to be output as {glossary-list} in AnkiConnect. Example of how grouped glosses might look:

    練る; 煉る
    1.  [v5r,vt]  to knead; to thicken into a paste (stirring over a flame)
    2.  [v5r,vt]  to polish (a plan, etc.); to refine; to elaborate; to work out
    3.  [v5r,vt]  to train; to drill; to exercise
    4.  (練る only) [v5r,vt] to gloss (silk); to soften; to degum
  • One thing I miss from Rikaisama is the frequency rank that it can output for each word. This helps me decide whether I should export the definition to Anki (I tend not to export uncommon words). Maybe Yomichan could potentially consider displaying this in the future, though the work might be slightly involved. Rikaisama uses the 5,000+ novel (Innocent?) corpus, while Aedict3 uses the Kamermans and Matsushita frequency lists.
Thanks for listening!

Sense grouping sounds useful and should not be too difficult to implement in a future release. Regarding frequency lists, Yomichan already uses information from EDICT to display what terms are popular (via tags like P, news, etc). Having a numeric index sounds helpful too, however.
Reply
(2016-08-12, 2:38 pm)FooSoft Wrote: Sense grouping sounds useful and should not be too difficult to implement in a future release. Regarding frequency lists, Yomichan already uses information from EDICT to display what terms are popular (via tags like P, news, etc). Having a numeric index sounds helpful too, however.
Yeah, sense grouping would be great to have.

About the frequency tags like P, news, ichi, etc., those are useful and I always export words with those tags to Anki. But most words don't have them, so having specific frequency ranks would be helpful for more advanced learners. For example, I now add words from Aedict3 when they're in the top 20,000 by Matsushita rank.

Thanks for the feedback. (I'd offer to try working on these features for fun, but I'd have to try to get the build stack set up and it's mostly unfamiliar...)
Edited: 2016-08-13, 12:32 am
Reply
(2016-08-11, 9:47 am)FooSoft Wrote:
(2016-08-11, 3:16 am)rokuro Wrote: There are also some kanji when they are by themselves it doesn't read like 唱 旦 昌 唱 嘲 置

Yomichan looks for valid terms, not individual characters. Therefore while 置 doesn't work, 置く does.
I wanted to pick up this topic again. Sometimes I want to find out what a single kanji means (e.g. in a name or coined compound or unusual/old word). Rikaisama/chan allows switching to kanji lookup by hitting a hotkey, which is handy for such situations. Would be nice if Yomichan could do this too.

Secondly, sometimes words are written in katakana for emphasis (don't have a recent example unfortunately), and Yomichan doesn't translate them. It would be nice if it had an option to do this.

Sorry for the feature requests Blush I was thinking other people might want the same things.
Edited: 2016-08-23, 12:44 pm
Reply
These sound like good ideas. Could you do me a favor and add these as individual feature requests on Github?
Reply
(2016-08-23, 12:48 pm)FooSoft Wrote: These sound like good ideas. Could you do me a favor and add these as individual feature requests on Github?

Done and thank you for considering the ideas  Smile
Edited: 2016-08-23, 2:08 pm
Reply
New version released, should be available in the app store shortly. It was a lot of work getting this one out of the door; I transitioned all of the dictionary data to use IndexDB within Chrome... this makes it so that the Yomichan extension uses an order of magnitude less memory and also paves the road for importing other types of dictionaries (such as J-J support which everyone wants).

In terms of more functional changes, dictionary entries are split out based on sense data, and now you can use Ctrl + Shift to look up Kanji information instead of only being able to lookup vocabulary terms.

Now that the whole dictionary / database migration thing is out of the way, I'll be working on more feature requests.
Reply
Hi, I just started using this. I'm having some trouble with the duplicate detection against cards that were added previously. Once I added a card from Yomichan, the add button gets greyed out, but it's not noticing if I already had a card that was added another way.

Would this check be going via canAddNote in AnkiConnect?

The Anki manual says Anki uses the first field to determine if a note is unique. I put the expression field first and it's definitely coming out the same between the duplicate cards.
Reply
(2016-09-22, 11:41 am)HelenF Wrote: Hi, I just started using this. I'm having some trouble with the duplicate detection against cards that were added previously. Once I added a card from Yomichan, the add button gets greyed out, but it's not noticing if I already had a card that was added another way.

Would this check be going via canAddNote in AnkiConnect?

The Anki manual says Anki uses the first field to determine if a note is unique. I put the expression field first and it's definitely coming out the same between the duplicate cards.

As far as I know, it should be working everywhere, but yes, canAddNote is the function you will want to look at if things are not working as they should for you.
Reply
(2016-09-18, 10:01 pm)FooSoft Wrote: New version released, should be available in the app store shortly. It was a lot of work getting this one out of the door; I transitioned all of the dictionary data to use IndexDB within Chrome... this makes it so that the Yomichan extension uses an order of magnitude less memory and also paves the road for importing other types of dictionaries (such as J-J support which everyone wants).

In terms of more functional changes, dictionary entries are split out based on sense data, and now you can use Ctrl + Shift to look up Kanji information instead of only being able to lookup vocabulary terms.

Now that the whole dictionary / database migration thing is out of the way, I'll be working on more feature requests.
Nice work FooSoft, thanks so much for continuing to work on Yomichan!

The splitting out into sense groups is resulting in many entries being shown (e.g. if you look up ねる), which makes it a bit unwieldy to look through. Furthermore, if you add one of the entries to Anki as a card, you only get that entry and not any other senses. This would be okay except that you can't export the same word in future, even if it's for another sense, because the Expression field has to be unique.

For these reasons, maybe it would be better to keep all the senses in the same entry? Grouping them as JMDict does? E.g.
Quote:練る; 煉る
  1. [v5r,vt]  to knead; to thicken into a paste (stirring over a flame)
  2. [v5r,vt]  to polish (a plan, etc.); to refine; to elaborate; to work out
  3. [v5r,vt]  to train; to drill; to exercise
  4. (練る only) [v5r,vt] to gloss (silk); to soften; to degum
Edited: 2016-09-26, 4:28 am
Reply
Also, the splitting causes stuff like this to happen:

石ころ --> entries with the readings せっかい and いしくれ appear, which are clearly incorrect for 石ころ
Reply
Looks like Anki's duplicate detection was confused because I had reordered the fields, and doing a "Check Database" rebuilt whatever it is, so that works now!

Another problem I'm having is when trying to use Yomichan for the first time after Chrome starts up, sometimes the popup won't appear. It seems to start working if I go into the settings and toggle something off and on again. (Currently "Activate on startup" is disabled.) I don't have much idea how to troubleshoot that.


(2016-09-26, 4:26 am)creamyhorror Wrote: The splitting out into sense groups is resulting in many entries being shown (e.g. if you look up ねる), which makes it a bit unwieldy to look through. Furthermore, if you add one of the entries to Anki as a card, you only get that entry and not any other senses. This would be okay except that you can't export the same word in future, even if it's for another sense, because the Expression field has to be unique.
If putting the sentence on the front of the card, it might be useful to add only the sense that's used in the current sentence, and have more than one card for some words. As I mentioned above, the uniqueness is checked by Anki and depends on the first field; so if you don't want words to be unique, you can move a different field (e.g. the sentence) into the first position. Also as I mentioned above, do a "Check Database" after changing the order, or the uniqueness checking might not work right for old cards.

Personally, I only put the word on the front, and there should only be one card for each word or I won't know which card I'm answering, so I really do want to put all the senses on the card.
(I'm not trying to recite a list of them - I pass the card if I know the reading and a vague idea of one of the meanings. Currently I don't add words with more than one common reading - will need to handle those separately.)
This style matches EDICT/Rikaichan grouping, i.e. group by (expression, reading).
Edited: 2016-09-26, 8:11 am
Reply
(2016-09-26, 4:26 am)creamyhorror Wrote:
(2016-09-18, 10:01 pm)FooSoft Wrote: New version released, should be available in the app store shortly. It was a lot of work getting this one out of the door; I transitioned all of the dictionary data to use IndexDB within Chrome... this makes it so that the Yomichan extension uses an order of magnitude less memory and also paves the road for importing other types of dictionaries (such as J-J support which everyone wants).

In terms of more functional changes, dictionary entries are split out based on sense data, and now you can use Ctrl + Shift to look up Kanji information instead of only being able to lookup vocabulary terms.

Now that the whole dictionary / database migration thing is out of the way, I'll be working on more feature requests.
Nice work FooSoft, thanks so much for continuing to work on Yomichan!

The splitting out into sense groups is resulting in many entries being shown (e.g. if you look up ねる), which makes it a bit unwieldy to look through. Furthermore, if you add one of the entries to Anki as a card, you only get that entry and not any other senses. This would be okay except that you can't export the same word in future, even if it's for another sense, because the Expression field has to be unique.

For these reasons, maybe it would be better to keep all the senses in the same entry? Grouping them as JMDict does? E.g.
Quote:練る; 煉る
  1. [v5r,vt]  to knead; to thicken into a paste (stirring over a flame)
  2. [v5r,vt]  to polish (a plan, etc.); to refine; to elaborate; to work out
  3. [v5r,vt]  to train; to drill; to exercise
  4. (練る only) [v5r,vt] to gloss (silk); to soften; to degum

Makes sense, I'll do this for the next release.
Reply
(2016-09-26, 4:37 am)creamyhorror Wrote: Also, the splitting causes stuff like this to happen:

石ころ --> entries with the readings せっかい and いしくれ appear, which are clearly incorrect for 石ころ

Yikes! This is actually a problem in the dictionary generator application that I created to import the dictionary into a format which Yomichan can use. Regardless, this will be fixed for next release.
Reply
(2016-09-26, 7:47 am)HelenF Wrote: Looks like Anki's duplicate detection was confused because I had reordered the fields, and doing a "Check Database" rebuilt whatever it is, so that works now!

Another problem I'm having is when trying to use Yomichan for the first time after Chrome starts up, sometimes the popup won't appear. It seems to start working if I go into the settings and toggle something off and on again. (Currently "Activate on startup" is disabled.) I don't have much idea how to troubleshoot that.


(2016-09-26, 4:26 am)creamyhorror Wrote: The splitting out into sense groups is resulting in many entries being shown (e.g. if you look up ねる), which makes it a bit unwieldy to look through. Furthermore, if you add one of the entries to Anki as a card, you only get that entry and not any other senses. This would be okay except that you can't export the same word in future, even if it's for another sense, because the Expression field has to be unique.
If putting the sentence on the front of the card, it might be useful to add only the sense that's used in the current sentence, and have more than one card for some words. As I mentioned above, the uniqueness is checked by Anki and depends on the first field; so if you don't want words to be unique, you can move a different field (e.g. the sentence) into the first position. Also as I mentioned above, do a "Check Database" after changing the order, or the uniqueness checking might not work right for old cards.

Personally, I only put the word on the front, and there should only be one card for each word or I won't know which card I'm answering, so I really do want to put all the senses on the card.
(I'm not trying to recite a list of them - I pass the card if I know the reading and a vague idea of one of the meanings. Currently I don't add words with more than one common reading - will need to handle those separately.)
This style matches EDICT/Rikaichan grouping, i.e. group by (expression, reading).

It's troubling to hear that Yomichan does not activate... hmm...
Could you try the following things (in this order) and let me know if any of them fixes the problem? This should provide information for me to figure out what exactly is going on.

When Yomichan should be enabled but not working:

  1. Click the ヨミ button twice (to disable and re-enable the extension): does it work now?
  2. Reload the current page: does it work now?
As for the other point, putting the sentence in the first field, while solving the problem of being able to create multiple cards for the same term, also introduces the problem of not being able to keep track of what terms have been added to the deck (this prevents you from adding words you think are new but you, in reality, have just forgotten).
Reply
(2016-09-26, 11:11 am)FooSoft Wrote: It's troubling to hear that Yomichan does not activate... hmm...
Could you try the following things (in this order) and let me know if any of them fixes the problem? This should provide information for me to figure out what exactly is going on.

When Yomichan should be enabled but not working:

  1. Click the ヨミ button twice (to disable and re-enable the extension): does it work now?
  2. Reload the current page: does it work now?
Clicking the ヨミ button twice doesn't help. Reloading the page fixes it, thanks! (why didn't I think of that)

Further, it seems to be caused by the "Continue where you left off" Chrome startup option, and only the front tab is affected (but changing to another tab and back doesn't fix it). It's happening about 50% of the time at the moment.

(2016-09-26, 11:01 am)FooSoft Wrote:
(2016-09-26, 4:26 am)creamyhorror Wrote: For these reasons, maybe it would be better to keep all the senses in the same entry? Grouping them as JMDict does? E.g.
Quote:練る; 煉る
  1. [v5r,vt]  to knead; to thicken into a paste (stirring over a flame)
  2. [v5r,vt]  to polish (a plan, etc.); to refine; to elaborate; to work out
  3. [v5r,vt]  to train; to drill; to exercise
  4. (練る only) [v5r,vt] to gloss (silk); to soften; to degum

Makes sense, I'll do this for the next release.
JMDict grouping puts all the kanji forms and all the kana forms of a word into the same entry. This could be more compact for display purposes, but what should actually get added to Anki when you click the button?

(2016-09-26, 11:11 am)FooSoft Wrote: As for the other point, putting the sentence in the first field, while solving the problem of being able to create multiple cards for the same term, also introduces the problem of not being able to keep track of what terms have been added to the deck (this prevents you from adding words you think are new but you, in reality, have just forgotten).
If someone wants to make a sentence card for each sense, and avoid making more than one card for any sense, the key field would need to be a consistent representation of (entry, sense). I don't actually know if anyone wants to do that though.

In practice, the sense distinctions aren't that rigid (in some cases it might be good to split a sense), and it won't do any harm to add another sentence for the same sense if you've forgotten it.
Reply
@HelenF thanks, that gives me a good list of things to try in order to track down this bug. It's likely related to injecting the floating IFRAME used for the definitions; I try to inject it only when you are using Yomichan, but it appears that it is too restrictive in some cases such as yours. 

As for what gets added to Anki when you press the "add" button? I imagine everything would get added; I think it makes sense that the flash cards contain the same info as the definition popup you interacted with to create them.
Reply
(2016-09-26, 12:19 pm)FooSoft Wrote: As for what gets added to Anki when you press the "add" button? I imagine everything would get added; I think it makes sense that the flash cards contain the same info as the definition popup you interacted with to create them.

{expression} would be how the word appears in the web page (or its deconjugated version) as currently.

The gloss can have everything in it - it would be useful to use the numbered list for senses, and semicolon-divide within a sense.

For kanji words, the main question is {reading} and hence {audio}.

Some example words to consider:
WWWJDIC Wrote:煙(P); 烟 【けむり(P); けぶり; けむ; けぶ】 (n) smoke; fumes; (P)

その他(P); その外(P); 其の他 【そのほか(P); そのた】 (n-adv,conj) (そのた is more the written form) etc.; otherwise; besides; in addition; the rest; the others; and so forth; (P)

園(P); 苑 【その(P); えん(P)】 (n,n-suf) (1) (えん usually when a suffix) (See りんご園) garden (esp. man-made); orchard; park; plantation; (2) (See 学びの園) place; location; (P)

Recent Rikaichan does actually group by entry. But if looking up a kanji word, it only shows the matching kanji form, and the same for kana, e.g. looking up 苑 doesn't show anything about 園.

Look up 苑 and get,
Rikaichan Wrote:苑 その, えん
(n,n-suf) garden (esp. man-made); orchard; park; plantation; place; location; (P)

Look up その and get,
Rikaichan Wrote:其の その
...that...
園 その
苑 その
(n,n-suf) garden (esp. man-made); orchard; park; plantation; place; location; (P)

One possibility would be to list the (kanji, reading) pairs separately above the glossary, and each pair has its own "add to Anki" buttons.
Reply
I spent some time looking into terms like 石ころ listing incorrect readings and fixed it, pushing out a new release (low hanging fruit, and I saw this as being a pretty serious bug). Changing the dictionary format to display sense data as discussed above will happen next.

@HelenF I've been trying to repro the issue with Yomichan not turning on locally with no luck. If you have any other information you could provide, or more specific repro steps I would appreciate it. If you could also open the developer console (ctrl + shift + i) and see if there are any JavaScript errors that would be helpful as well.
Reply
I was using Fedora 24, but just tested on Windows 10 and getting the same behaviour, though perhaps less often. I've seen it with all Yomichan's options checked, and with all the options unchecked. There's nothing in the console.

This is all I'm doing:
  • Set Chrome startup to "Continue where you left off"
  • Set Yomichan to "Activate on startup" (it doesn't seem to make any difference, but it saves a click)
  • Open a Japanese page in the current or only tab (seems to be any page, but the front page of Wikipedia will do)
  • Repeatedly, close Chrome and open it again, and try to scan words to see if the popup appears
Edited: 2016-09-28, 6:28 am
Reply
(2016-09-28, 6:28 am)HelenF Wrote: I was using Fedora 24, but just tested on Windows 10 and getting the same behaviour, though perhaps less often. I've seen it with all Yomichan's options checked, and with all the options unchecked. There's nothing in the console.

This is all I'm doing:
  • Set Chrome startup to "Continue where you left off"
  • Set Yomichan to "Activate on startup" (it doesn't seem to make any difference, but it saves a click)
  • Open a Japanese page in the current or only tab (seems to be any page, but the front page of Wikipedia will do)
  • Repeatedly, close Chrome and open it again, and try to scan words to see if the popup appears

Awesome, thanks for the steps. I was able to reproduce and work around the apparent Chrome bug (timing issue where tab notifications sometimes don't fire), and have updated the extension.
Reply