回答編集履歴
1
誤字の修正
answer
CHANGED
@@ -42,11 +42,11 @@
|
|
42
42
|
# 修正コード2: using lower n-gram order
|
43
43
|
references = 'I have a pen and apple'
|
44
44
|
ref = [word_tokenize(references)]
|
45
|
-
hypothesis = 'I have a
|
45
|
+
hypothesis = 'I have a pineapple'
|
46
46
|
hyp = word_tokenize(hypothesis)
|
47
47
|
bleuscore = bleu_score.sentence_bleu(ref, hyp, (1./3., 1./3., 1./3.))
|
48
48
|
print(bleuscore)
|
49
|
-
#0.
|
49
|
+
#0.3820903727892856
|
50
50
|
|
51
51
|
# 修正コード3: use SmoothingFunction()
|
52
52
|
references = 'I have a pen and apple'
|