# kpu/kenlm

KenLM: Faster and Smaller Language Model Queries

Repository: https://github.com/kpu/kenlm
Canonical: https://ross.abutalabs.com/products/kenlm
Homepage: http://kheafield.com/code/kenlm/
Language: C++
License: NOASSERTION
License Family: other
Last push: 2025-03-30T17:50:54+00:00

## Health v2 (maintenance only)
Score: 39/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 14, release rhythm 35, longevity 100
- inputs: {"age_days": 5405, "days_push": 521, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2799, forks 551 (observed 2026-08-28T04:07:22.541252+00:00)

## What it is
KenLM is a C++ toolkit for estimating, filtering, and querying n-gram language models with modified Kneser-Ney smoothing. It is designed for fast, low-memory queries and scalable on-disk estimation, and is commonly embedded in machine translation and speech recognition decoders.

## Use cases
- estimate an n-gram language model from a large text corpus
- query language model scores quickly with low memory
- convert ARPA language models to a fast binary format
- filter an ARPA model down to a specific vocabulary
- integrate a language model into a machine translation decoder
- score sentences with a language model for speech recognition rescoring

## When to choose
- you need fast, memory-efficient n-gram language model scoring in C++ or Python
- you are training large n-gram LMs that do not fit in memory
- you need a battle-tested LM for MT or ASR decoding pipelines

## When to avoid
- you need neural language models rather than n-gram models
- you want a pure-Python solution without C++ compilation
- you need heavy pruning or modern smoothing methods beyond modified Kneser-Ney

## Facets
- artifact type: library
- maturity: stable
- function: nlp, machine-learning, cli, parser
- domain: machine-learning, developer-tools
- platform: windows, cpp, python, cli
- tags: language-model, n-gram, kneser-ney, arpa-format, speech-recognition-support, mt-decoder, natural-language-processing, linux, macos

## Member repositories
- kpu/kenlm (main) score 39

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:22.541252+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:49:04.088625+00:00, confidence not recorded.
  - readme: https://github.com/kpu/kenlm (fetched 2026-08-28T04:07:22.541252+00:00, sha 837d2c9c9433)
  - homepage: http://kheafield.com/code/kenlm/ (fetched 2026-08-29T09:54:44.110344+00:00, sha 3894e107a551)
  - site_page: https://kheafield.com/code/kenlm/developers (fetched 2026-08-29T09:54:44.113340+00:00, sha 4a21b85e0931)
- Data as of 2026-08-30T08:39:29.467469+00:00.
