Skip to content

cocreators-ee/vocabulary-trainer

Repository files navigation

Vocabulary Trainer

Tool to practice the vocabulary in a foreign language.

Development

Dependencies for development:

After checking out locally, run in the folder:

pre-commit install

Frontend

To work on the frontend, you will need to install the dependencies and then run the dev script:

cd frontend
pnpm install
pnpm run dev

Data processing (optional)

When you add new languages or words and need them automatically processed via the Translation API, you can use the data processing tooling.

To run the language data processing you will need the following environment variables set:

  • TRANSLATOR_KEY: The access key to your Azure Translator resource

To get the key set up your resource as per the guidance at https://docs.microsoft.com/en-us/azure/cognitive-services/translator/quickstart-translator?tabs=python#prerequisites

Once that is set up, you can run it:

poetry install
poetry run translate

This will generate frontend/src/languages/languages.json and frontend/src/languages/*/words.json for configured languages.

Language configuration is stored in data_processing/settings.py and source word lists in data_processing/languages/*/words.txt - the word lists must be in UTF-8 encoding, one word / phrase per line.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •