student2222333051 commited on
Commit
7e8ae2a
·
verified ·
1 Parent(s): e905b57

Delete utils.py

Browse files
Files changed (1) hide show
  1. utils.py +0 -7
utils.py DELETED
@@ -1,7 +0,0 @@
1
- from nltk.translate.bleu_score import sentence_bleu, SmoothingFunction
2
-
3
- def compute_bleu(reference, hypothesis):
4
- smoothie = SmoothingFunction().method4
5
- ref = [reference.split()]
6
- hyp = hypothesis.split()
7
- return sentence_bleu(ref, hyp, smoothing_function=smoothie)