NIST Score Calculator
Paste a candidate translation and one or more references to get the NIST score, the information-weighted precision for each n-gram order 1–5, the NIST brevity penalty, and a match inspector that shows every n-gram's information weight — so you can see exactly how the number was derived. Matches NLTK sentence_nist, no signup, runs in your browser.
How it works
NIST is the information-weighted cousin of BLEU, introduced by George Doddington (2002) for the NIST machine-translation evaluations. Like BLEU it compares a system's output (the candidate) against one or more correct referencetexts, but it makes two changes that address BLEU's known weaknesses. The final score is:
NIST = ( Σ scoreₙ, n = 1…N ) · BP
- Information weights. Every reference n-gram gets a weight measuring how much information it carries:
Info(w₁…wₙ) = log₂( count(w₁…w_{n-1}) ÷ count(w₁…wₙ) ). The counts are taken over the reference set. For a unigram the prefix is empty, so the numerator is the total number of reference n-grams. A predictable word (one that almost always follows its prefix) scores near 0; a rare, surprising word scores high. This is what makes NIST reward content words over function words. - Information-weighted precision per order.For each order n from 1 to N, the tool sums the information weight of every candidate n-gram that also appears in a reference (clipped to the reference's count), then divides by the number of candidate n-grams of that order:
scoreₙ = Σ Info(matched) ÷ (candidate n-grams). With several references, the reference giving the largest weighted match is used for that order. - Sum, don't average. BLEU takes the geometric mean of its precisions, so a single order with no match forces the whole score to 0. NIST simply adds the per-order scores, so a missing 4-gram only means that order contributes nothing — the lower orders still count. This is why NIST is more stable on short sentences.
- Brevity penalty. With Lsys the candidate length and Lref the (accumulated) reference length, and ratio = Lsys / Lref:
BP = exp( β · (ln ratio)² )when the candidate is shorter than the reference, and BP = 1 when it is at least as long. β = ln(0.5) ÷ (ln 1.5)² ≈ −4.216 is fixed so the penalty is exactly 0.5 at a two-thirds length ratio, matching mteval-v13a.
The brevity penalty is computed two independent ways — the mteval piecewise function and the closed-form β formula — and flagged “cross-checked” when they agree. The numbers reconcile with NLTK's sentence_nist when the tokenisation matches. Because NIST is unbounded and shifts with N and the reference count, always report it together with those settings.
Worked examples
Frequently asked questions
Sources & references
- Doddington, G. (2002) — Automatic Evaluation of Machine Translation Quality Using N-gram Co-Occurrence Statistics (HLT)
- NIST — MT evaluation tools (mteval-v13a reference scorer and length-penalty constants)
- NLTK nltk.translate.nist_score — reference implementation (sentence_nist, corpus_nist)
The formulas and the worked examples on this page were last reconciled against Doddington (2002) and NLTK sentence_nist on 2026-07-13. The calculation module ships with a built-in assertion that re-runs every worked example, so a regression in the NIST math fails fast.
Related tools
Comments & feedback
Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.
Found a bug, edge case, or want to suggest an improvement?
Email me at [email protected] — most fixes ship within 24 hours.