Skip to main content

CrossRS

CrossRS is a command-line tool for improving language production skills through reverse translation exercises. Given a corpus in your target language, CrossRS translates sentences into a source language you already know and asks you to translate them back, reinforcing vocabulary and grammar through word-based spaced repetition. Because CrossRS uses GPT under the hood, you must have a paid OpenAI account and an API key to run it.

How It Works

CrossRS focuses on words sorted by their frequency in the corpus. You learn the most common ones first. Each study round:

  1. CrossRS picks a sentence containing the next word to learn.
  2. The sentence is translated into your source language and shown to you.
  3. You translate it back into the target language.
  4. CrossRS evaluates your translation and provides feedback — either a ✅ confirmation or a ❌ with a highlighted diff showing the minimal corrections needed.

Sentences you translate correctly on the first try are scheduled for a single review in 29 days 20 hours. Otherwise, they enter a spaced-repetition queue with reviews at 20 hours, 6 days 20 hours, and 29 days 20 hours before being marked as learned.

Installation

Install Python 3.13 or later and pipx, then run:

pipx install crossrs       # install
pipx upgrade crossrs       # upgrade
pipx uninstall crossrs     # uninstall

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:

crossrs init <target-lang> <corpus>

<target-lang> is a language code (e.g., de, fr, uk), and <corpus> is the path to the corpus file.

Study a Language

crossrs study <target-lang> <source-lang> [--threshold T] [--model <GPT_MODEL>] [--api-key <OPENAI_KEY>] [--listen] [--asr-model <ASR_MODEL>]
  • <target-lang> — the language code you initialized earlier.
  • <source-lang> — the language you want sentences translated into (e.g., en).
  • --threshold / -t — the learnedness threshold for words (default: 3). A word is considered fully learned once it has appeared in this many learned sentences.
  • --model — the GPT model to use for translation and evaluation.
  • --api-key — your OpenAI API key.
  • --listen — enable voice input: press Enter to record your translation via microphone instead of typing.
  • --asr-model — the ASR model for speech-to-text (e.g., gpt-4o-transcribe). Required when --listen is used.

Instead of passing --model, --api-key, and --asr-model each time, you can set the environment variables CROSSRS_MODEL, CROSSRS_API_KEY, and CROSSRS_ASR_MODEL.

Voice Input

When --listen is enabled, pressing Enter at the translation prompt starts recording. Speak your translation and press Enter again to stop. The recording is transcribed and submitted automatically. You can also type your translation directly — only an empty Enter triggers recording.

Voice input requires the audio extra:

pipx install crossrs[audio]   # or: pip install crossrs[audio]

View Your Progress

crossrs stats <target-lang> [--threshold T]

Displays:

  • Sentences: learned + in queue / total
  • Words: learned / total, with word-level coverage
  • Total rounds: the number of translation attempts so far

Other Commands

crossrs path <target-lang>               # show the path to the language data file
crossrs delete <target-lang> [--force]   # delete the language data file; use --force to skip the confirmation prompt

Metadata

Release files for crossrs 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crossrs 0.3.0
File Size Uploaded Provenance Actions
crossrs-0.3.0.tar.gz 27.2 kB Without provenance Details for crossrs-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crossrs 0.3.0
File Interpreter ABI Platform Actions
crossrs-0.3.0-py3-none-any.whl Python 3 none any Details for crossrs-0.3.0-py3-none-any.whl

Total release size: 56.1 kB

Release files / crossrs-0.3.0.tar.gz

Download URL crossrs-0.3.0.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
410d421a2378dc84644e5c3c361bfd0d75da28097316dbbb279d84fd8d5892c1
BLAKE2b-256 checksum
How to use checksums
5359437a5a9b23181ff82134e170578127728e72d907d529c20f732f7bf90ccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / crossrs-0.3.0-py3-none-any.whl

Download URL crossrs-0.3.0-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d92edcad09a4290b874750ed5b1c2743f4cfc8d461491f449f12b7d5e552a483
BLAKE2b-256 checksum
How to use checksums
082925ce4dae4b7f98fdcb8c46c85a269c08f83898eae44e541e8085cabb96a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for crossrs 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page