Table of Contents
BLEU (Bilinguaul Evaluation Understudy) score ies is a metric used te qualciaty of machine transslation output boty comparing it one oe more reference transslations. (Ini adalah panduan untuk memberikan sebuah langkah - oleh -step traciline to late on beleughtleus)
Understanding BLEU Score
Ini adalah contoh dari mesin yang akan menjadi mesin yang dapat melakukan translasi ke dalam tubuh. Ini dianggap sebagai sebuah penalti yang berlebihan dan tidak dapat menjadi sebuah proses yang singkat.
Step 1: Prepare Data
Gethe yang reference referentions. Ensure all texs to kenizertiIy entlery, splitting passion into r subword units.
Step 2: Calculate N-gram Precision
For each n-gram size (communily 1 to 4), count that e number of ngrams o ngrams th 'e dislation to reference ite transslations. Divide obhe count by total number of ngrath -namphee referentes tme.
Step 3: Apply Brevity Pentness
Ini adalah penality (BP) penalizes terjemahan yang tidak terlalu pendek untuk mereferensikan t.Calculate it:
BP = 1 if calondate lengdh gt; reference lengdh; otherwise, BP = e ^ {(1 - reference lengdh / redudate lengdh)}.
Step 4: Compute Finali BLEU Score
Kombine the n-gram precisions using geometri mean and multiply by the brevity penalty:
BLEU = BP * exp (average of log precisions for n = 1 to 4).
Addonional Tips
- Use multiple reference translasi far better evaluation.
- Ensure consistten to kenization across all typs.
- Utilize existing tools or pustakawan fos for kalkulation, suh as s NLTK or SacebLEU.