Terminal and GTK-based flashcard app with spaced repetition using SuperMemo 2
BSD-3-CLAUSE License
language_practice
Flashcard terminal app with spaced repetition
While any language with gender or verb aspect can be used, declension/verb conjugation charts are currently only supported for Ukrainian, Russian and French.
This application relies heavily on the TOML format so Python 3.11 is the minimum supported Python version.
Run pip install --user language-practice
.
Download the repo and run pip install --user .
in the top level of the repo.
Run language-practice path/to/toml/file.toml
to start the program. This may take
some time if you are using conjugation or declension charts as it will pull them in
parallel from the internet. An internet connection is only required for this part
of the execution.
Command line options:
-t
/--traceback
: useful for bug reporting, bubbles the Python exception up to the-r
/--reset
: Redownload the entire cache and current information about what words you-f
/--file
: Path to the file containing the flashcard information-d
/--dir
: File is a directory and all TOML files in the given directory should be loadedRun ctrl-C to exit the program and save your progress
The file format is TOML.
lang
: Accepts uk
, ru
and fr
as values if you would like to pull conjugationPut each word under a [[words]]
heading.
Supported keys are:
word
: required, vocabulary word to learn in another languagedefinition
: required, definition of the vocabulary to learn in your language,aspect
: aspect of the verb, displayed with the definition to differentiate betweenusage
: arbitrary usage note about the word entrypart_of_speech
: used to differentiate between relational adjectives and nouns andcharts
: add custom inflection chart where not available on WiktionaryType:
This app will show you words you get right less and less frequently and words you get wrong more and more frequently until you get them right.
The exact algorithm is rather simple and could potentially be improved.
num_right
is number of times guessed correctly.
num_wrong
is number of times guessed incorrectly.
num_wrong_since
is the number of times you have gotten it wrong since 10 correct
answers. This is used to balance out words that you sometimes get correct and sometimes
get incorrect to keep it in less frequent but current rotation until you consistently
guess it right.
num_right
and num_wrong
are mutally exclusive. If one is non-zero, the other will
be set to zero.
The card will be repeated n
cards later where n
is
num_right * max(15 - num_wrong_since, 1)
or max(15 - num_wrong, 1)
.
Please open bugs and request features on Github! I would love to make this more useful to others.