TF-IDF similarity for decks whith python script

To learn more effective, it’s best practice to not have cards, that are too similar. Coded a python script for that: This script checks for similar cards in a deck and adds tags to them. It uses TF-IDF and cosine similarity to calculate the similarity between cards. It connects to the ankidatabase with ankipandas. Works fine for me. Might be useful for some of you as well. Some programming skills needed though (running & editing python, installing spacy & ankipandas).

Do you have a source on this? We might have different ideas of what “similar” means. My understanding is that similar cards can be super helpful, especially identification vs. reconstruction.

Q: What’s the capital of California?
A: Sacremento

Q: Sacramento is the capital of what state?
A: California

A way to attack the same problem from two possible situations. I’d guess that your script would consider these similar, but I can’t test it until later.

1 Like