FooSoft / yomichan

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

[Bug] Frequency sorting dictionary not working if the dictionary doesn't have an entry despite the frequency sorting dictionary having an entry #2112

Closed kuroahna closed 2 years ago

kuroahna commented 2 years ago

Browser version Version 99.0.4844.84 (Official Build) (64-bit)

Yomichan version 22.2.2.0

Description

  1. Install a dictionary like jmdictWithUchiRemoved.zip, which has 家 = うち removed from the entries (obtained from Yomichan website)
  2. Install another dictionary like [Bilingual] JMdict (English).zip (Shoui's JMDict version)
  3. Install BCCWJ-LUW frequency list
  4. You should have JMdict (English) rev.jmdict4 at the top with priority 2 (the dictionary with うち removed), JMdict rev.JMdict1 next with priority 1, and BCCWJ-LUW rev.1 last with priority 0
  5. In Yomichan settings, set Frequency sorting dictionary to BCCWJ-LUW and Frequency Sorting Mode to Rank-based image
  6. Use Yomichan and hover on the word 家
  7. Notice that the ordering is incorrect:

image

image

image

I expect at least いえ、うち、か to be the first 3 entries in that order, since BCCWJ-LUW is my frequency sorting dictionary.

However, we see いえ、か、け、や、んち、うち, where うち is last.

  1. Now, set JMdict rev.JMdict1 to priority 3 (which has うち in the dictionary as an entry) image

We properly see いえ、うち、か as the first 3 entries since BCCWJ-LUW has an frequency rating for them.

Note: This is an issue because in a real world use case, I have 旺文社国語辞典 第十一版 as my main dictionary (dictionary at the top), and JMDict at the bottom. Since 旺文社国語辞典 第十一版 doesn't have うち as an entry, the sorting is messed up. Maybe it should look at other dictionaries instead of just the first one in your installed dictionaries list and then it can apply the frequency sorting dictionary ordering.