0Pricing
NLP Academy · บทเรียน

ให้คะแนนการสร้างข้อความด้วย ROUGE และ BLEU

วัดคุณภาพของการสรุปและการแปล

ให้คะแนนการสร้างข้อความด้วย ROUGE และ BLEU เป็นบทเรียน NLP Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน 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” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส NLP Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส NLP Academy มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “ให้คะแนนการสร้างข้อความด้วย ROUGE และ BLEU”

วัดคุณภาพของการสรุปและการแปล คุณปฏิบัติ NLP Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน NLP Academy หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน NLP Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน

บทเรียน “ให้คะแนนการสร้างข้อความด้วย ROUGE และ BLEU” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน NLP Academy นี้ได้ไหม

ได้ บทเรียน NLP Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. บทสรุปแบบดึงข้อมูลเทียบกับแบบสรุปความ
  2. สรุปด้วยโมเดล Seq2Seq
  3. การแปลภาษาด้วยเครื่องในทางปฏิบัติ
  4. ให้คะแนนการสร้างข้อความด้วย ROUGE และ BLEU
← กลับไปที่ NLP Academy