def bleuscorer()

in utils.py [0:0]


def bleuscorer(hyps, refs):
    #print(hyps, refs)
    bleu = []
    for hyp, ref in zip(hyps, refs):
        hyp = hyp.split()
        ref = [a.split() for a in ref]
        #hyp = nltk.word_tokenize(hyp)
        #ref = [nltk.word_tokenize(a) for a in ref]
        bleu += [nltk.translate.bleu_score.sentence_bleu(ref, hyp)]
    return sum(bleu) / len(bleu)