Skip to main content

Blitzer

A tool for vocabulary extraction intended for language learners.

Supported Languages

Word boundaries use Unicode letters plus AI-reviewed language-specific rules. These may not be perfect. Multiword paradigm entries are omitted, and dictionary coverage varies. Development packs are excluded from this list and from releases. The list describes this checkout's next release; newly promoted packs become downloadable after publication.

If your target language is not on this list, see languages without a release-ready pack for an explanation of what is needed to implement it. If your language is not listed in that document either, open a pull request, ideally with a source of inflectional data for that language.

Language Code
Adyghe ady
Afrikaans afr
Akan aka
Albanian sqi
Amharic amh
Ancient Greek grc
Anglo-Norman xno
Armenian hye
Ashaninka cni
Assamese asm
Asturian ast
Aymara aym
Azerbaijani aze
Bashkir bak
Basic base
Basque eus
Belarusian bel
Bengali ben
Braj bra
Breton bre
Bulgarian bul
Catalan cat
Cebuano ceb
Central Kurdish ckb
Central Pame pbs
Chewa nya
Chichicapan Zapotec zpv
Classical Armenian xcl
Classical Syriac syc
Congo Swahili swc
Cornish cor
Cree cre
Crimean Tatar crh
Czech ces
Dakota dak
Danish dan
Dutch nld
Eastern Highland Chatino cly
Egyptian Arabic arz
Eibela ail
English eng
Estonian est
Faroese fao
French fra
Friulian fur
Gã gaa
Galician gal
Georgian kat
German deu
Gothic got
Greenlandic kal
Gujarati guj
Gulf Arabic afb
Haida hai
Hebrew heb
Hiligaynon hil
Hindi hin
Hungarian hun
Icelandic isl
Indonesian ind
Ingrian izh
Irish gle
Italian ita
Kabardian kbd
Kannada kan
Karelian krl
Kashubian csb
Kazakh kaz
Ket ket
Khakas kjh
Khaling klr
Khalkha Mongolian khk
Kholosi hsi
Kodi kod
Kongo kon
Kunwinjku gup
Ladin lld
Lamaholot slp
Latin lat
Latvian lav
Lingala lin
Lithuanian lit
Livonian liv
Livvi-Karelian olo
Low German nds
Lower Sorbian dsb
Ludian lud
Luganda lug
Macedonian mkd
Magahi mag
Malagasy mlg
Maltese mlt
Manx glv
Māori mao
Mapudungun arn
Mezquital Otomi ote
Middle French frm
Middle High German gmh
Middle Low German gml
Modern Greek ell
Modern Standard Arabic ara
Murrinhpatha mwf
Navajo nav
Neapolitan nap
North Frisian frr
Northern Kurdish (Kurmanji) kmr
Northern Sami sme
Norwegian Bokmål nob
Norwegian Nynorsk nno
O'odham ood
Occitan oci
Old Church Slavic chu
Old English ang
Old French fro
Old High German goh
Old Irish sga
Old Norse non
Old Saxon osx
Oromo orm
Pali pli
Pashto pus
Persian fas
Polish pol
Portuguese por
Quechua que
Romanian ron
Russian rus
Sakha sah
San Pedro Amuzgos Amuzgo azg
Scottish Gaelic gla
Seneca see
Serbo-Croatian hbs
Shipibo-Konibo shp
Shona sna
Slovak slk
Slovenian slv
Southern Kurdish sdh
Southern Sotho (Sesotho) sot
Spanish spa
Swedish swe
Swiss German gsw
Tagalog tgl
Tatar tat
Telugu tel
Turkish tur
Turkmen tuk
Tuvan tyv
Ukrainian ukr
Upper Sorbian hsb
Uyghur uig
Uzbek uzb
Venetian vec
Veps vep
Võro vro
Votic vot
Walmajarri wmt
Welsh cym
Western Frisian fry
Xibe sjo
Yaitepec Chatino ctp
Yanesha ame
Yiddish yid
Yoloxóchitl Mixtec xty
Zarma dje
Zenzontepec Chatino czn
Zulu zul

Install

Requires Python 3.11 or newer.

pip install bltzr
bltzr --help

Extract vocabulary

bltzr blitz -l eng -t "The dogs are running." --lemmatize
bltzr blitz -l eng --file chapter.txt --freq --context
cat chapter.txt | bltzr blitz -l eng --format tsv > vocabulary.tsv

-l chooses the language. Use -t for text, --file for a UTF-8 file, or pipe text into the command. Words are shown as written by default; --lemmatize shows dictionary forms, such as dogs → dog.

Check dictionary membership

Check individual words against a local language dictionary:

bltzr check-word -l eng dogs dog xyzzy
bltzr check-word -l eng dogs dog --match lemma
bltzr check-word -l eng dogs --match form --format json

--match accepts lemma, form, or both (the default). Lemma mode checks whether the supplied word is a headword: dog matches, while dogs does not. Form mode checks stored forms, including each lemma's own form, so both dog and dogs match. Because packs include lemma self-forms, form and both normally give the same result.

Text output is one input word, a tab, and true or false per line. JSON includes language, match, and an ordered results list of {"word": "dogs", "found": true} records. Input order and duplicates are preserved. A completed check exits with status 0 even for missing words; operational errors use status 1 and CLI usage errors use status 2.

Python callers can use the same read-only operations:

from blitzer.core import BlitzerService

service = BlitzerService()
service.contains("dogs", "eng", match="form")  # True
service.contains("dogs", "eng", match="lemma")  # False
service.contains_many(["dog", "dogs", "xyzzy"], "eng")  # [True, True, False]

contains_many accepts an iterable of words and returns booleans in input order; an empty iterable returns [] after checking dictionary availability. Passing a bare string as the batch is an error. Each item must be one supported word; empty strings, whitespace, and prose raise ValueError. Matching applies the pack's Unicode normalization, lowercasing, and substitutions. It does not segment prose or apply known-word lists, skip files, vocabulary filters, frequency sorting, or history settings.

English works offline from its bundled dictionary; an installed English pack overrides it. Other languages require an installed pack. The command accepts --config, --no-config, and --language-packs-dir (also --plugins-dir) as usual. Missing or damaged dictionaries raise errors, and base is rejected because it has no dictionary. Checks never download data, invoke morphological analyzers, or write user data. A missing word indicates dictionary coverage; it does not establish that the word is invalid.

Detect a text's language

Guess which of your installed languages a text is written in:

bltzr detect-language "Dober dan, kako ste danes?"
bltzr detect-language --file article.txt --format json
pbpaste | bltzr detect-language --limit 3

The first line is the winning language code, followed by one line per candidate: code, name, score, and matched/sampled tokens. Only installed languages (and bundled English) can be named. Tokens shorter than three letters are ignored.

Each installed language is scored by the share of sampled tokens found in its dictionary. Up to --sample-size (default 300) distinct tokens are chosen at random; add --seed for repeatable output. The command prints unknown when the best score is below --min-score (default 0.3), when its lead over the runner-up is under --min-margin (default 0.05), or when the text has fewer than three usable words. Treat unknown as "not enough evidence", not as an error; it exits 0.

English is often mixed into other languages, so words that a candidate lacks but English has count as half a miss against that candidate. Use --ambient CODE (repeatable) to choose different or additional loanword languages, or --no-ambient to count every unmatched word fully. Closely related languages, such as Czech and Slovak, can still score near each other; a low margin then yields unknown.

Language packs

Basic (base) and English (eng) work immediately, without a download. Basic extracts words without a dictionary and cannot lemmatize them. Other languages need a pack:

bltzr list-languages
bltzr list-available-languages  # offline catalog, including packs not installed
bltzr install-plugin slv
bltzr blitz -l slv -t "Nisem tako prepričan."

To update an installed pack, use bltzr install-plugin slv --replace. Processing works offline once the pack is installed.

The next release supports both pack configuration formats 1 and 2. Format 2 adds reviewed rules for tone marks, joiners and word-internal punctuation; update the application before installing a format-2 pack. Dictionaries vary in coverage, and support for a script does not imply coverage of every orthography or dialect. See project status and remaining development work.

Japanese remains a development pack. The optional analyzer can be tested from this checkout with .venv/bin/python -m pip install -e '.[dev,japanese]' and --language-packs-dir ./language-packs/dev. Its dictionary must already be installed; processing never downloads models automatically. Sanskrit, Tibetan and Urdu still require additional lexical-segmentation work.

You can also install a local pack with bltzr install-plugin ./my-pack/slv. To use this checkout's packs directly, add --language-packs-dir /path/to/blitzer-py/language-packs to the command.

Create your config

Blitzer automatically reads ~/.config/bltzr/bltzr.toml. No environment variable or command-line option is needed. Open it in your editor (the command creates it if absent):

bltzr config  # or: bltzr conf; uses $VISUAL or $EDITOR

Here is an arbitrary default:

[defaults]
freq = true
context = true
sort = "alphabetical"
bold = "markdown"
save_context = "flag-only"

[languages.eng]
skip_exact_words_file = "./eng-exact-words.txt"
skip_word_families_file = "./eng-word-families.txt"

[defaults] applies to every language. [languages.eng] overrides settings for English; use the language code visible with bltzr list-available-languages if you are not sure which to use.

Save your settings and run normally:

bltzr blitz -l eng -t "He, she, it, swims!"

Use -C PATH to load another config, or -n to ignore configuration. The default file is $XDG_CONFIG_HOME/bltzr/bltzr.toml, falling back to ~/.config/bltzr/bltzr.toml when the variable is unset or empty. BLITZER_CONFIG can explicitly select a different file, but you do not need it for the default location. Command-line options override your config; for example, --no-context hides example sentences even when context = true.

Relative paths in TOML are relative to the config file's directory; paths passed on the command line are relative to the working directory. ~ and environment variables expand in configured paths.

Leave [locations].language_packs_dir unset for normal installation: packs use $XDG_DATA_HOME/bltzr/languages (default ~/.local/share/bltzr/languages). Saved sentence history uses $XDG_STATE_HOME/bltzr/contexts.db (default ~/.local/state/bltzr/contexts.db). These XDG defaults apply on all platforms; relative XDG roots are ignored. The old plugins_dir config key and --plugins-dir flag remain aliases. A custom directory affects both installation and processing, so use it consistently. Existing files in the former platform data directory are not moved automatically; set explicit locations to keep using them.

Both language-list commands sort alphabetically by displayed name and print Name (code). list-available-languages reads the packaged download registry without accessing the network or your config. It includes base mode and bundled English; development-only languages without registered downloads are omitted.

See config.example.toml for the full set of settings. The complete command reference is in bltzr(1).

Choose which words to skip

Keep two optional files. Each has one job, and you can use either or both. Skipped words do not appear in the vocabulary and do not contribute to counts or example sentences.

Skip these exact words (word form)

Use this list when you know some spellings of a word but still want to study others. For the verb to be, you might know be and am but still want to study is, are, was, were, being, and been.

Create eng-exact-words.txt beside your config:

be
am
cat

Then select it:

[languages.eng]
# Skip only these exact words (word form).
# "be" and "am" leave "is", "are", "was", "were", "being", and "been" counted.
# "cat" leaves "cats" counted.
skip_exact_words_file = "./eng-exact-words.txt"

Even though be is the basic word, putting it in this file skips only be. It does not skip its other forms. Likewise, cat does not skip cats. For Slovenian, listing sem and biti here leaves sva counted.

Skip these words and their other forms: word families (lexeme/lemma)

Use this list when you want to skip a whole word family. The program uses its dictionary to connect the different forms of a word. For to be, put be in the file, without “to”:

be
cat
[languages.eng]
# Skip these word families (lexeme/lemma), using the dictionary.
# "be" skips "be", "am", "is", "are", "was", "were", "being", and "been".
# "cat" skips both "cat" and "cats".
skip_word_families_file = "./eng-word-families.txt"

A word family means the grammatical forms of the same word, such as cat and cats. It does not include related words such as catlike. Write the basic word in this file: be, rather than am; cat, rather than cats. The program does not guess a whole family from an inflected word you list.

What you put in a file Which file What gets skipped What can still be counted
be, am Exact words (word form) be, am is, are, was, were, being, been
be Word families (lexeme/lemma) be, am, is, are, was, were, being, been Other words
cat Exact words (word form) cat cats
cat Word families (lexeme/lemma) cat, cats Other words

Use both lists and choose what to display

[languages.eng]
skip_exact_words_file = "./eng-exact-words.txt"
skip_word_families_file = "./eng-word-families.txt"

Each setting names one file, not a word or an array of files. Leave out settings you do not need. Paths are relative to the config file and can use ~ or environment variables. A missing file is treated as an empty list; ordinary extraction does not create it.

Both files contain one word per line. Blank lines and whole-line # comments are allowed. Hyphenated words such as sally-anne are accepted; internal spaces are not. Words are compared using the language pack's normalization, usually ignoring capital letters. Accepting a hyphenated entry does not change how the language's tokenizer divides a hyphenated word in input text.

Display is a separate choice. --lemmatize (-L) shows basic words (lexeme/lemma), such as are → be or cats → cat. Without it, the output shows words as written (word form). This never changes what either file skips. If be and am are in the exact-word file, are still contributes a count, even when -L displays it as be.

Word-family matching depends on dictionary coverage. A spelling can belong to more than one family: English saw can mean the tool or a past form of see. Listing see removes that candidate; the saw tool candidate can remain. The program does not decide the meaning from the sentence.

The bundled English dictionary currently lacks some links in the to be family. The examples above describe the grammatical relationship; a pack must contain those links to skip the whole family automatically. With the current bundled data, put all eight spellings in the exact-word file if you want to skip them all. Changing a skip list does not repair missing dictionary data.

Command-line options

bltzr blitz -l eng -L --skip-exact-words-file eng-exact-words.txt \
  --skip-word-families-file eng-word-families.txt -t "I am here. They are here."

Each file option replaces only the corresponding configured file for that run; it leaves the other list active. --show-all-words (-N) skips neither list and cannot be combined with explicit skip-file options. Basic (base) mode supports exact words; word families require a dictionary.

Check exclusions from another pipeline

Use check-excluded to query your configured lists or remove excluded words from another tool's output. For a pipeline that already emits lemmas:

other-pipeline | bltzr check-excluded -l slv --match lemma --output remaining
bltzr check-excluded -l slv biti sem jesti --match lemma
bltzr check-excluded -l slv --file lemmas.txt --output excluded
bltzr check-excluded -l slv biti maček --format json

--match lemma checks the word-family list, --match form checks the exact-word list, and --match both (default) checks either list. Inputs are already identified words or lemmas: excluding biti removes input biti but leaves input sem in lemma mode. The command does not infer lemmas or require dictionary membership. Use blitz for prose processing and dictionary-based family filtering; check-word answers whether a word occurs in the dictionary independently of user exclusions.

Supply positional words, a UTF-8 --file (-i), or one word per stdin line. File/stdin input trims surrounding whitespace and ignores blank lines; invalid entries report their source line. Positional words cannot be combined with --file. Explicit words or a file take precedence over unrelated stdin. Empty lists succeed. Original spelling, input order and duplicates are preserved after trimming line input.

--output status (default) emits word<TAB>true|false, where true means excluded. --output remaining emits only words to keep; --output excluded emits only words removed. Filtered text is one word per line, with no header. No matches produce empty filtered text output. --format json emits language, match, output, and a results array, filtered by the same output selection. Each result has this shape:

{"word": "BITI", "normalized": "biti", "excluded": true, "matched_lists": ["word-families"]}

The list names are exact-words and word-families; a word can match both. Matching uses the selected pack's normalization configuration, so the language pack configuration must be available. base uses its basic normalization. No database, morphological analyzer, download or write is involved. The usual --config, --no-config, and --language-packs-dir (also --plugins-dir) options apply. Display, sorting and automatic-update settings do not affect this check.

An unset list is empty. Every explicitly configured list selected by --match must exist, be readable, and contain valid entries, even for an empty input. This is stricter than blitz, which permits missing optional skip files. Unselected lists are not read. Checks complete before any output is emitted. Exit status is 0 for completed checks, 1 for operational errors, and 2 for usage errors.

Legacy configuration is supported: forms_only contributes exact words; known_file and exclusions contribute exact words when effective filter_by is forms, or word families when it is lemmas. These are direct list checks, not a simulation of all blitz filtering behavior.

Python callers can use BlitzerService.check_excluded(words, language_code, match="both"). It accepts an iterable of individual words (not a bare string) and returns ordered, immutable ExclusionResult records with word, normalized, excluded, and matched_lists fields. API words must already be valid individual entries; file/stdin whitespace trimming belongs to the CLI.

Updating and tidying the lists

Reading a story does not mean you learned its words, so automatic additions are off by default. To preview additions, choose which list would receive them:

bltzr blitz -l eng -i chapter.txt --update-list exact-words --test-known
bltzr blitz -l eng -i chapter.txt --update-list word-families --test-known

These commands use the corresponding file from your config. Previews change neither list nor history. Replace --test-known with --update-known to write additions. Exact-word updates add encountered spellings (word form); word-family updates add dictionary basic words (lexeme/lemma). The choice does not depend on -L. Only dictionary-matched surviving words propose additions, and only the selected list is written. Existing files receive a .bak backup on rewrite.

For automatic updates configured with auto_update_known = true, explicitly set update_list = "exact-words" or "word-families" in the language section. --show-all-words affects skipping, not updating; use --no-update-known to disable additions.

Check either list for duplicates, then apply cleanup if wanted:

bltzr cleanup-known eng ~/.config/bltzr/eng-exact-words.txt
bltzr cleanup-known eng ~/.config/bltzr/eng-exact-words.txt --apply

Cleanup normalizes entries, preserves comments, and saves a .bak copy.

Moving from older settings

Existing configurations and scripts using known_file, exclusions, forms_only, and filter_by continue to work with their original behavior. The old CLI file options are kept for compatibility but hidden from normal help.

For migration:

  • Files formerly read through known_file or exclusions with filter_by = "forms" belong in the exact-word list (word form).
  • With filter_by = "lemmas", they belong in the word-family list (lexeme/lemma). Review entries and use basic words in this file; move inflected entries that you only want skipped exactly into the exact-word file.
  • Files formerly in forms_only belong in the exact-word list.
  • If several old files belong in one new list, combine their contents into one file. Duplicate entries do not change the result.

Remove the old file settings and language-level filter_by when selecting the new settings. Do not mix old and new file settings in one language section. The two new lists have fixed meanings; a legacy filter_by in [defaults] does not change them. Selecting new file options on the command line uses the new lists for that run instead of loading configured legacy files. Combining new file settings with explicit legacy filtering options is an error. Your configuration and word files are never migrated automatically.

Useful options

Option Effect
--freq Include each word's count in your text
--context Include example sentences
--context-limit 3 Include up to three examples per word
--bold off Turn off highlighting; also accepts html, markdown, org
--sort appearance Keep the order words first appeared
--sort textual-frequency Show the most frequent words first
--exclude-unknown Hide words missing from the dictionary
--skip-exact-words-file PATH Skip only the listed words (word form)
--skip-word-families-file PATH Skip listed words and their other forms (lexeme/lemma)
--show-all-words Count words without applying either skip list
--format json Export JSON; also accepts text, tsv, report

Sorting also accepts alphabetical, global-frequency (requires a pack with frequency data), and custom with --custom-order PATH.

Save and review example sentences

bltzr blitz -l eng -t "He helps me." --lemmatize --save-context
bltzr history eng
bltzr history eng help

History uses the displayed word: help with --lemmatize, or helps without it. Saved history is separate from your known-word list.

In config, save_context accepts "flag-only" (save when requested), "always", "prompt", or "never". Use --no-save-context to skip saving.

Help and development

bltzr blitz --help
bltzr check-word --help
bltzr detect-language --help
bltzr check-excluded --help
bltzr dev --help
man ./docs/bltzr.1

The distribution installs the man page under share/man/man1 in Python's installation prefix. If your environment includes that directory in its man search path, use man bltzr. Otherwise open the file directly, for example man "$VIRTUAL_ENV/share/man/man1/bltzr.1" for a virtual environment.

For a source checkout, install with .venv/bin/python -m pip install -e '.[dev]' after creating a virtual environment. Run tests with .venv/bin/python -m pytest -q. See release setup for one-command GitHub/PyPI publication and language-pack publishing for manual releases.

License

CC BY-SA 3.0. Dictionary packs retain their own licenses and attribution.

Metadata

Release files for bltzr 0.2.8

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

Source distribution (sdist)

Source distribution for bltzr 0.2.8
File Size Uploaded Provenance Actions
bltzr-0.2.8.tar.gz 29.6 MB With provenance Details for bltzr-0.2.8.tar.gz

Built distribution (wheel)

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

Total release size: 59.2 MB

Release files / bltzr-0.2.8.tar.gz

Download URL bltzr-0.2.8.tar.gz
Size 29.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b0b91eaf2423e0643b4e3a3f4cb875025a69090390fb62189308a49332d76918
BLAKE2b-256 checksum
How to use checksums
1413a86944843a95ba57082908a58502b6bb9fad8af8300ee12d00ead57a78ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / bltzr-0.2.8-py3-none-any.whl

Download URL bltzr-0.2.8-py3-none-any.whl
Size 29.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1e77ad968f9782f120bb298914461491704e249769721be55785263b921376ec
BLAKE2b-256 checksum
How to use checksums
35ae17b56a5d5ed8b1aa020ec8a7e62066e081a3457f3a38ef122927fe112612
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for bltzr 0.2.8

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bltzr-0.2.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

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