ROUGE と BLEU で生成結果を評価する
要約と翻訳の品質を測定する
「ROUGE と BLEU で生成結果を評価する」はCoddyKit上の無料NLP Academyレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはNLP Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 NLP Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
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. 🎯
よくある質問
「ROUGE と BLEU で生成結果を評価する」レッスンは無料ですか?
はい。「ROUGE と BLEU で生成結果を評価する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、NLP Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 NLP Academyコースには全4レッスンが含まれています。
「ROUGE と BLEU で生成結果を評価する」で何を学びますか?
要約と翻訳の品質を測定する ブラウザで直接実行するハンズオンコードでNLP Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
NLP Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのNLP Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。
「ROUGE と BLEU で生成結果を評価する」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このNLP Academyレッスンでコードを書いて実行できますか?
はい。すべてのNLP Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- 抽出型要約と抽象型要約
- Seq2Seq モデルで要約する
- 実践的な機械翻訳
- ROUGE と BLEU で生成結果を評価する