-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete display of delimited dictionary entries #5168
Comments
See Dushistov/sdcv#30. |
Unsurprisingly because this affects Japanese text I went and fixed it 😅. I've submitted Dushistov/sdcv#78 upstream which should fix this issue. |
Just asking: how do you judge the performance impact of your upstream PR ? |
Yes to your questions -- only after finding an entry (binary search) it will do the minimum possible extra work to find any extra entries (linearly look before and after the found index, comparing each with the string). If there are no identical entries it'll add only two extra string comparisons, if there are identical entries I doubt you can do better than All-in-all it shouldn't make lookups much slower than they already were. On my laptop, exact searches with my 7 relatively-large Japanese dictionaries takes ~80ms for both the no matches case and the lots-of-entries-matching (>100 for はい) cases. Fuzzy searching takes 300-500ms (depending on whether it finds anything during fuzzy searching). This is basically identical to the time taken with sdcv EDIT: I added some micro-optimisations (using |
Dictionary look-up of a word that contains an entry with delimited portions displays a seemingly arbitrary portion.
Two examples using the wikt-en-ALL-2018-05-15 dictionary:
. The Koreader dictionary only displays the Dutch entry like this, which happens to be the first one.
in StarDict, but only the Dutch entry in Koreader, which here happens to be the last entry.
The .dict.dz, .idx and .ifo files are placed within a directory in /mnt/onboard/.adds/koreader/data/dict/.
E: Title and text edits because I accidentally posted before completing the Issue.
E2: formatting
The text was updated successfully, but these errors were encountered: