Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

preling-1.2.6.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

preling-1.2.6-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file preling-1.2.6.tar.gz.

File metadata

  • Download URL: preling-1.2.6.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for preling-1.2.6.tar.gz
Algorithm Hash digest
SHA256 0bd1a44211e1c7bf8416bd12ecf426c56d5b1474ea84f5d233d48ca2e53a041c
MD5 d4c7575623c343b76512feace444bc6f
BLAKE2b-256 31efdd397f4bf5db7f76d86d8490554a3d3a2990d5e841fa2028283357d114aa

See more details on using hashes here.

File details

Details for the file preling-1.2.6-py3-none-any.whl.

File metadata

  • Download URL: preling-1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 20.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for preling-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b91be541cce6ed2300b6e01a87a0a756b290a34099bf61f05d8e2b9c4809a8c7
MD5 bdaf01e65a8382f23b915d6d1422a30a
BLAKE2b-256 6b823985dcb1c6fef998b3a69407670b44cd246b860e017155e4ebeb8a5164f1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page