質問するログイン新規登録

回答編集履歴

1

誤字の修正

2020/11/03 02:30

投稿

toast-uz
toast-uz

スコア3266

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 pen and pineapple'
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.7937005259840998
49
+ #0.3820903727892856
50
50
 
51
51
  # 修正コード3: use SmoothingFunction()
52
52
  references = 'I have a pen and apple'