language-id

Notebooks

The notebooks under src/language_id/notebooks/ are interactive walkthroughs of the same building blocks the CLI uses. Launch them with your editor of choice or with Jupyter:

uv run jupyter lab src/language_id/notebooks/

All notebooks read the API keys from the repo-root .env file (see Getting started).

Run model evaluation

run-model-evaluation.ipynb — benchmark several LID models side by side in one go.

Compare saved runs

compare-saved-runs.ipynb — post-hoc analysis of runs you have already computed.

Train a single-language detector

train-single-language-detector.ipynb — build a specialist detector for one (typically low-resource) language and see how it stacks up against off-the-shelf models.

Train and evaluate a local LID model

train-and-evaluate-local-lid.ipynb — a tutorial that builds a multi-class language detector locally and explains the process step-by-step.

Add a new language to LID

add-new-language-to-lid.ipynb — bootstrap support for a language that an off-the-shelf model handles poorly (or not at all) by folding your own corpus into the training and evaluation data.