Open MarvNC opened 2 years ago
I agree that exact text match sometimes has significance. I haven't looked at the code for a while so I am not sure if this is the correct place in code, but I believe that the sort function Translator._sortTermDictionaryEntryDefinitions
should take text
in Translator.findTerms
and use it in addition to the other attributes in each term. Perhaps a distance function [1] or just v1 equals --> 1, v2 equals --> -1 or both equal --> 0.
Description I've noticed this happen on many words. If you have text replacement on (hiragana to katakana here) then sometimes a non exact match will appear first. ごわごわ is one example but it happens to other words as well. It does not appear to be affected by the use of a frequency sorting dictionary.![chrome_ごわごわ_-_Yomichan_Search_-_Google_Chrome_2022-03-10_13-06-51](https://user-images.githubusercontent.com/17340496/157754767-92095f26-938a-4b04-abf0-a2d2a99203c2.png)
Browser version Chrome Version 99.0.4844.51 (Official Build) (64-bit)
Yomichan version Yomichan 21.10.31.1
Exported settings file (If you think it might be relevant, create a settings export file using the Export Settings button on the settings page; zip or rename the resulting file to .txt to attach to the issue.)