BLEU là viết tắt của Bilingual Evaluation Understudy, là phương pháp đánh giá một bản dịch dựa trên các bản dịch tham khảo, được giới thiệ...

import nltk.translate.bleu_score as bleu reference_translation=['The cat is on the mat.'.split(), 'There is a cat on the mat.'.split() ] candidate_translation_1='the the the mat on the the.'.split() candidate_translation_2='The cat is on the mat.'.split() print("BLEU Score candidate 1: ",bleu.sentence_bleu(reference_translation, candidate_translation_1)) print("BLEU Score candidate 2: ",bleu.sentence_bleu(reference_translation, candidate_translation_2))Với kết quả 0.47 và 1, BLEU đánh giá câu dịch thứ 2 tốt hơn câu dịch thứ 1 vì nó khớp tuyệt đối với câu trong tập ví dụ. Nếu bạn thích bài viết này, đừng ngại chia sẻ với những người quan tâm. Hãy thường xuyên truy cập trituenhantao.io hoặc kết nối với chúng tôi (dưới chân trang) để nhận được những thông tin quan trọng và cập nhật từ lĩnh vực! Nguồn: https://trituenhantao.io/kien-thuc/bleu-phep-do-trong-dich-may/ https://tedu.nhuttruong.com/bleu-phep-do-trong-dich-may/?feed_id=9&_unique_id=65f6f94c94ce6
COMMENTS