I have a premade japanese vocabulary deck of 6000 cards, where most words include kanji. However, these cards do not include the meaning of the kanji used in the words. Does anyone know of a way I could “automatically” add the necessary kanji meanings that each card requires?
These add-ons are similar to that functionality so may be helpful.
- Anki Dojo
- Jisho Support
- Japanese Definition Scraper from weblio Dictionary
- Daijirin Dictionary Scraper
- Migaku Anki Add-on
Or, try asking on the language learning reddit for a good way to do it.
I managed to solve the problem by making my own python script. Thank you, though.
Some else could profit from your script, do you mind sharing it?
I’m very busy at the moment, so I won’t elaborate on the process. In any case, it was very convoluted and specific to my case. But you’re right, I will post the (ugly) script below, as well as link to the two necessary files I used: a list of all kanji thaught through wanikani, with their primary meaning, as well as an ordered list of all vocabulary found in these anki decks https://ankiweb.net/shared/by-author/1863168610. I then simply imported the resulting text file (also given in the link below) into anki, and it somehow added the meaning automatically to the vocab cards (i needed to add a new field to the vocab cards, and import the text file using the same note style).
Code
lines = []
with open("kanjimeanings.txt", "r", encoding="utf8") as infile:
for line in infile:
line = line.split("\t")
lines.append(line)
kanjis = lines.copy()
kanjidict = {}
for i in range(0, len(kanjis)):
kanjidict[kanjis[i][0]] = kanjis[i][1]
lines = []
with open("orderedvocablist.txt", "r", encoding="utf8") as infile:
for line in infile:
line = line.split("\t")
lines.append(line)
vocab = lines.copy()
i = 0
for tup in vocab:
vocab[i][1] += str(i+1)+"\t"
for letter in tup[2]:
if letter in kanjidict:
vocab[i][1] += kanjidict[letter].rstrip("\n") + " - "
vocab[i][1] = vocab[i][1].rstrip(" - ")
vocab[i][1] += " "+"\n"
i += 1
file = open("orderedvocablistwithkanjimeanings.txt", "w")
for a in vocab:
file.write(a[1])
file.close()
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.