Reading & practice
Reading
Lector supports two content formats:
- EPUB files: upload directly through the library interface
- Web articles: paste a URL and Lector extracts the content via Readability
You can also paste raw text directly for quick reading practice.
Click-to-translate
Click any word while reading to see its translation. If you have an ANTHROPIC_API_KEY configured, Lector uses Claude for context-aware translation of uncommon words and phrases. Without an API key, it falls back to a built-in dictionary of the top 2000 words.
Translation quality depends on which AI provider you have configured.
Word states
Every word you encounter is tracked with a state:
- New: you haven't interacted with this word yet
- Learning: you've looked it up or saved it
- Known: you've marked it as known
Words are highlighted in your text based on their state, so you can see at a glance how much of a passage you already know.
Cloze practice
The cloze practice system ships with frequency-ordered sentence banks from Tatoeba for every supported language, so you learn common words first.
Practice modes
- Multiple choice: pick the correct word from four options
- Typing: type the missing word (with optional hard mode that disables hints)
SRS scheduling
Sentences are scheduled using spaced repetition with five mastery levels:
| Mastery | Interval |
|---|---|
| 0% | Immediate |
| 25% | 1 day |
| 50% | 3 days |
| 75% | 7 days |
| 100% | 14 days |
LLM providers
Lector uses a large language model for context-aware translations when you click words and phrases. You choose between two providers in Settings → AI Provider: Anthropic (cloud) or Local / self-hosted (any OpenAI-compatible server).
A note on local quality: a capable local model holds up well even on a low-resource language like Afrikaans. In our own testing (Afrikaans → English, chrF++ on Tatoeba), a good ~12B model run through LM Studio matched the cloud models. What matters is picking a general instruction-tuned model (roughly 8B or larger, not a tiny or coder-only model), more than choosing cloud over local.
Anthropic (cloud)
The highest-quality option. Uses Claude for context-aware translation of words, phrases, and grammar explanations.
Lector supports two authentication methods:
- API key: Get one from console.anthropic.com. Set
ANTHROPIC_API_KEYin your environment, or enter it in Settings. Pay-as-you-go billing. - OAuth token (Pro/Team plan): Uses your existing Claude Pro or Team subscription credits. Set
CLAUDE_CODE_OAUTH_TOKENin your environment. Note: OAuth connections have slower initial startup times compared to API keys.
- Best translation quality, especially for less common languages
- Requires internet access and an Anthropic account
Local / self-hosted (OpenAI-compatible)
Points Lector at any server that speaks the OpenAI chat API: Ollama, LM Studio, vLLM, or a remote OpenAI-compatible endpoint. One config covers them all: an endpoint, an optional API key, and a model name. The text you're translating stays on your hardware (unless you point it at a remote endpoint).
In Settings → AI Provider, choose Local / self-hosted (OpenAI-compatible), then set:
- Preset (optional) — pick Ollama or LM Studio to autofill the endpoint, or Custom for anything else. It only fills the endpoint; edit it afterwards if you like.
- Endpoint — the base URL of your server (
http://localhost:1234for LM Studio,http://localhost:11434for Ollama). Lector appends/v1itself. The call is made server-side, solocalhostworks even when Lector is hosted elsewhere, except from inside Docker, where you need a host-reachable address. - API Key (optional) — leave empty for a local server. Only needed for reverse-proxied or cloud endpoints. Sent as a Bearer token from the server, never exposed to the browser.
- Model — click Fetch models to list what the server reports via
/v1/models, or type a model id directly.
Use Refresh to confirm a green "Connected" status. For a full walkthrough with LM Studio, including the Docker networking gotcha, see Run translations locally with LM Studio.
AnkiConnect
Lector connects directly to AnkiConnect running on your local machine. This lets you push vocabulary cards from Lector straight into Anki Desktop. No proxy server, no cloud sync.
Setup
- Install the AnkiConnect add-on in Anki Desktop
- In AnkiConnect's config, add your Lector origin to the CORS allowlist:
{
"webCorsOriginList": ["http://localhost:3000"]
} If you're accessing Lector via a reverse proxy, add that origin too (e.g. https://lector.home.yourdomain.com).
Note: AnkiConnect runs on localhost:8765 by default. The connection is browser-to-localhost, so Anki Desktop must be running on the same machine as your browser.