Skip to content
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

Mutiple Field Checks for Duplicate Card Detection #1793

Open
40elyK opened this issue Jan 31, 2025 · 8 comments
Open

Mutiple Field Checks for Duplicate Card Detection #1793

40elyK opened this issue Jan 31, 2025 · 8 comments
Labels
area/anki The issue or PR is related to Anki integration kind/enhancement The issue or PR is a new feature or request triage/not-our-bug The issue is not a yomitan bug

Comments

@40elyK
Copy link

40elyK commented Jan 31, 2025

Currently, to check duplicates, Yomitan uses specifically the first field of any card (regardless of Anki's sort field).
Rather than do this, perhaps have it so that you can specify the field(s) that are checked, and if all are matching a given card, than the card is detected as a duplicate. This would also be good for setting multiple fields for recognizing new cards. This way words with the same kanji form can be recognized as not duplicates, as they have a different word reading, and since Yomitan is checking two fields now instead of one, it won't be registered as a false positive duplicate.

@40elyK 40elyK added the kind/enhancement The issue or PR is a new feature or request label Jan 31, 2025
@Kuuuube Kuuuube added the area/anki The issue or PR is related to Anki integration label Feb 8, 2025
@Mjishu
Copy link

Mjishu commented Feb 12, 2025

Is this an issue with yomitan or anki-connect? we invoke canAddNotes and change whether or not we allow duplicates but isn't it anki-connect that chooses which fields to compare?

@40elyK
Copy link
Author

40elyK commented Feb 12, 2025

I suppose it would be latter, but you likely know way more than me. I thought that since Yomitan had a configurable Anki Card format that it was also responsible for duplicate detection.

@Mjishu
Copy link

Mjishu commented Feb 12, 2025

What do you think @Kuuuube ?

@Kuuuube
Copy link
Member

Kuuuube commented Feb 12, 2025

Afaik you are correct in this being an ankiconnect issue. I'm not sure if it's possible to sanely work around this (we dont want to be sending a ton of requests). If it got implemented in ankiconnect then it could be considered for yomitan.

Maybe make a poc with yomitan and ankiconnect before submitting a patch to ankiconnect if you want to actually work on it so it can be reviewed on the yomitan side first.

@Kuuuube Kuuuube added the triage/not-our-bug The issue is not a yomitan bug label Feb 18, 2025
@artjomsR
Copy link

This does seem like an AnkiConnect issue. If you only care about checking for duplicates on one particular field, then the easiest solution for now is to simply reorder that field to be the 1st one in your note type (as it's what AnkiConnect uses for duplicate detection, rather than the sort field)

@40elyK
Copy link
Author

40elyK commented Feb 19, 2025

Alrighty, thanks for looking into it.

@artjomsR
Copy link

Not related to Yomitan, but is there a good way to raise this issue with AnkiConnect? I'd like to do so. I see it's been migrated away from GitHub and there's no obvious contact button on either their website or the new git host website

@MarvNC
Copy link
Member

MarvNC commented Feb 24, 2025

https://git.sr.ht/~foosoft/anki-connect#hey-could-you-add-a-new-action-to-support-feature

Not really.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/anki The issue or PR is related to Anki integration kind/enhancement The issue or PR is a new feature or request triage/not-our-bug The issue is not a yomitan bug
Projects
None yet
Development

No branches or pull requests

5 participants