FooSoft / yomichan

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

ッ -> っ not being replaced by the 'Convert katakana to hiragana' text replacement option #2125

Open MarvNC opened 2 years ago

MarvNC commented 2 years ago

Description With the katakana -> hiragana replacement option on 'use both variants' some things like ハモッた and テンパッた are not properly scanned. I was able to fix it by adding the following text replacement. Yomichan_Settings_-_Google_Chrome_2022-05-01_16-36-47

Looking in the code for the replacement it seems ッ is within KATAKANA_RANGE so I couldn't figure out why it doesn't work.

Browser version

Yomichan version 22.4.4.0

Exported settings file

toasted-nutbread commented 2 years ago

Can you explain what you mean by "not properly scanned"? Can you show an example of what you are/were seeing?

stephenmk commented 2 years ago

I think the problem is that テンパる and ハモる will scan if they are inflected as テンパった and ハモった, but not as テンパッた or ハモッた

toasted-nutbread commented 2 years ago

The reason why this happens is because the kana conversions convert the entire term, not only certain characters.

Therefore, the reason why テンパった works and テンパッた doesn't is because テンパッた will be converted either テンパッタ or てんぱった, both of which won't be deinflected to テンパる.

This is part of a underlying issue of normalizing terms/readings during the import process for optimal lookups, which has not yet been addressed due to numerous technical challenges.

Related: #461