Command-line tool for learning foreign languages through gradual exposure to new vocabulary
Project description
PreLing
PreLing is a command-line tool for improving language-comprehension skills through gradual exposure to new vocabulary. It supports every language that SpaCy supports. Because PreLing uses GPT under the hood, you must have a paid OpenAI account and an API key to run it.
Installation
Install Python 3.12 or later and pipx, then run:
pipx install preling # install
pipx upgrade preling # upgrade
pipx uninstall preling # uninstall (hopefully you won't need this)
Initialize a New Language
Prepare a plain-text file that contains one sentence per line in the language you want to learn. For example, you can download a monolingual corpus from OPUS. Then run:
preling init <lang> <corpus>
<lang> is the language code, and <corpus> is the path to the corpus file.
Study a Language
preling study <lang> [--audio] [--audio-only] [--model <GPT_MODEL>] \
[--tts-model <TTS_MODEL>] [--api-key <OPENAI_KEY>]
<lang>– the language code you initialized earlier.--audio– play audio along with the text.--audio-only– play audio without displaying the text.--model– the GPT model to use for grammar evaluation.--tts-model– the text-to-speech model to use for audio playback.--api-key– your OpenAI API key.
Instead of passing these options each time, you can set the environment variables PRELING_API_KEY, PRELING_MODEL, and PRELING_TTS_MODEL.
View Your Progress
preling stats <lang>
Other Commands
preling path <lang> # show the path to the language-data file
preling delete <lang> [--force] # delete the language-data file; use --force to skip the confirmation prompt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file preling-1.2.4.tar.gz.
File metadata
- Download URL: preling-1.2.4.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b1fa922e5e7618aa9cde815602166c06e0595ad9eb706e658c7a2f9720ca392
|
|
| MD5 |
87c99a9bf288d3fc3044021e10ad6815
|
|
| BLAKE2b-256 |
060d54727e3601086f0b66575b379103f835328ace360249b3f083e207cff62c
|
File details
Details for the file preling-1.2.4-py3-none-any.whl.
File metadata
- Download URL: preling-1.2.4-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d77505065356298c452023cdbb92585a816c3281f787ac8061ded16228440a2c
|
|
| MD5 |
a7cc43bc29497ec0403d4d004d1b00dc
|
|
| BLAKE2b-256 |
b764a53363f8608e046f16e1ca24ef61f1c3e0cefa4f68f00a45e63048cc08d0
|