043e3000ad4a59f434e1975f9f0f7c0ac9aead53,scripts/nmt/bleu.py,,compute_bleu,#Any#Any#Any#Any#Any#,47

Before Change


    5-Tuple with the BLEU score, n-gram precisions, brevity penalty,
        reference length, and translation length
    
    precision_numerators = Counter()
    precision_denominators = Counter()
    ref_length, trans_length = 0, 0
    assert len(reference_corpus) == len(translation_corpus), \
        "The number of translations and their references do not match"

After Change


    5-Tuple with the BLEU score, n-gram precisions, brevity penalty,
        reference length, and translation length
    
    precision_numerators = [0 for _ in range(max_n)]
    precision_denominators = [0 for _ in range(max_n)]
    ref_length, trans_length = 0, 0
    for references in reference_corpus_list:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/gluon-nlp
Commit Name: 043e3000ad4a59f434e1975f9f0f7c0ac9aead53
Time: 2018-04-22
Author: xshiab@ust.hk
File Name: scripts/nmt/bleu.py
Class Name:
Method Name: compute_bleu


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: f287a04243fb8cbe966161c106dce14fac274a6c
Time: 2018-01-06
Author: max.lapan@gmail.com
File Name: ch12/libbots/utils.py
Class Name:
Method Name: calc_bleu


Project Name: NTMC-Community/MatchZoo
Commit Name: 4bc0cb5d2924a63cf06f641b7cf36f799885f33f
Time: 2018-12-26
Author: 948280670@qq.com
File Name: matchzoo/processor_units/processor_units.py
Class Name: WordHashingUnit
Method Name: transform