APR-NLP-006 // apr-v2-trie
Interpolated 4-Gram Language Model
Compact KenLM-inspired interpolated 4-gram language model for fast perplexity scoring and OCR/ASR beam rescoring.
Runtime: Loading .apr...
Inference: --
CLI Execution & Inspection
$ apr run ngram-language-model --score "pure rust deterministic builds" $ apr inspect ngram-language-model.apr --verify-sha256
Mathematical Formulation
Chain-Rule Perplexity
Numerical Contract
Probability distribution sums to 1.0 over vocabulary; perplexity monotonically improves from 1-gram to 4-gram.