ripose-jp / Memento

An mpv-based video player for studying Japanese
https://ripose-jp.github.io/Memento/
GNU General Public License v2.0
472 stars 22 forks source link

Duplicate card logic has false positives with pure hiragana words #151

Closed stephen-huan closed 1 year ago

stephen-huan commented 1 year ago

If one has a pure hiragana word in their deck, for example, なんか, then memento will think that it is a card for any expression with the reading なんか. In particular, this includes words like 軟化, 何か, 南下, 軟貨, 難化 just to list a few which have completely different meanings.

The way to tell they're marked as duplicates is that the "+" sign turns into a hamburger menu (the icon with 3 lines) and clicking on the icon searches for something like "軟化 OR なんか" in the deck.

Based on this, my guess is that memento will try substituting both the original kanji expression as well as the hiragana reading for the {expression} value and consider a card present in the deck already if either of these possible substitutions are in the deck.

I find this behavior a bit odd, in particular, yomichan does not do this. For words that can be written not in hiragana it's possible to circumvent this issue by simply using the non-pure hiragana writing but for a word like なんか there simply isn't an alternative writing.

It's possible the issue is just with my particular memento configuration through anki_connect.json. If it isn't just a configuration issue, I'd suggest including a configuration option along the lines of "de-duplicate cards based on reading" or something along those lines.