The code and data in this repo are designed to help myself learn German by typing in the answers. It is based on the Cloze (fill-in-the-blank) type of Anki cards.
Each note in the Anki deck is designed to support language learning with the following fields:
- Sentence: A sentence in the target language with the cloze deletion.
- Rank: The rank of the word being learned.
- Word: The target word to learn.
- Definition: The definition of the word.
- Translation: The translation of the sentence into the learner's first language.
- Note: Any additional notes for the word and sentence (e.g., related grammar).
- CEFR: The Common European Framework of Reference for Languages (CEFR) level of the word.
Check out the raw data for an example.
First, preprocess the raw CSV file:
python ./scripts/preprocess.py ./raw/input.csv ./pre/output.csv
This will generate a new CSV file named "input_preproc.csv", where specified words in each sentence are wrapped with the cloze deletion syntax.
Next, generate the Anki deck:
python ./scripts/build_deck.py ./pre/output.csv output
This will create an Anki deck named "output.apkg" in decks/
that can be imported into Anki.
You can personalize the appearance of your Anki cards by editing the HTML templates (front.html
and back.html
) and the CSS file (style.css
).
I am working on a few decks for German language learning. The data sources are: