0Pricing
NLP Academy · Lesson

Scoring Generation With ROUGE and BLEU

Measure summary and translation quality.

Scoring Generation With ROUGE and BLEU is a free NLP Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the NLP Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Score Generation?

Summaries and translations are free-form text, so there is no single right answer. We need metrics to compare output against reference text. 📏

Compare to a Reference

Both ROUGE and BLEU compare your generated text to one or more human references. More overlap with the reference means a higher score.

BLEU for Translation

BLEU measures how many short word sequences in your output also appear in the reference. It is the classic metric for machine translation.

BLEU Rewards Precision

BLEU is precision-focused: it asks how much of your output matches the reference. A brevity penalty stops models from cheating with very short text.

ROUGE for Summaries

ROUGE is the go-to metric for summarization. It checks how much of the reference content your summary managed to recover.

ROUGE Rewards Recall

ROUGE leans on recall: did your summary capture the important words from the reference? ROUGE-1 counts single-word overlap.

ROUGE-L and Sequences

ROUGE-L looks at the longest matching word sequence, rewarding output that keeps the reference's order, not just its words.

Computing ROUGE

The evaluate library makes scoring a one-liner. Load rouge and pass your predictions with their references.

import evaluate
rouge = evaluate.load("rouge")
print(rouge.compute(predictions=preds, references=refs))

Computing BLEU

BLEU works the same way. Note each prediction needs a list of references, since several translations can be correct.

bleu = evaluate.load("bleu")
print(bleu.compute(predictions=preds, references=refs))

Higher Is Better

Both scores rise with overlap. They are useful for comparing models, but a single absolute number means little on its own.

Metrics Miss Meaning

These metrics count word overlap, not true meaning. A perfect paraphrase using different words can still score low, so pair them with human review.

Quick Check

Which metric is recall-focused and standard for summarization?

Recap

You learned to score generated text: BLEU for translation precision, ROUGE for summary recall, and why both still need human judgment. 🎯

Frequently asked questions

Is the “Scoring Generation With ROUGE and BLEU” lesson free?

Yes — the full text of “Scoring Generation With ROUGE and BLEU” is free to read here on the web, and the NLP Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the NLP Academy course, upgrade to CoddyKit PRO.

What will I learn in “Scoring Generation With ROUGE and BLEU”?

Measure summary and translation quality. You practise NLP Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start NLP Academy?

No prior experience is required. NLP Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Scoring Generation With ROUGE and BLEU” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this NLP Academy lesson?

Yes. Every NLP Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Extractive vs Abstractive Summaries
  2. Summarizing With a Seq2Seq Model
  3. Machine Translation in Practice
  4. Scoring Generation With ROUGE and BLEU
← Back to NLP Academy