(references: List[List[str]], hypotheses: List[Hypothesis])
return bleu_score
Given decoding results and reference sentences, compute corpus-level BLEU score.
    @param references (List[List[str]]): a list of gold-standard reference target sentences
    @param hypotheses (List[Hypothesis]): a list of hypotheses, one for each reference
    @returns bleu_score: corpus-level BLEU score
Given decoding results and reference sentences, compute corpus-level BLEU score.
Given decoding results and reference sentences compute corpus - level BLEU score .
def compute_corpus_level_bleu_score(references: List[List[str]], hypotheses: List[Hypothesis]) -> float:
    """ Given decoding results and reference sentences, compute corpus-level BLEU score.
    @param references (List[List[str]]): a list of gold-standard reference target sentences
    @param hypotheses (List[Hypothesis]): a list of hypotheses, one for each reference
    @returns bleu_score: corpus-level BLEU score
    """
    if references[0][0] == '<s>':
        references = [ref[1:-1] for ref in references]
    bleu_score = corpus_bleu([[ref] for ref in references],
                             [hyp.value for hyp in hypotheses])
    return bleu_score
def compute_corpus_level_bleu_score ( references : List [ List [ str ] ] , hypotheses : List [ Hypothesis ] ) -> float : if references [ 0 ] [ 0 ] == '<s>' : references = [ ref [ 1 : - 1 ] for ref in references ] bleu_score = corpus_bleu ( [ [ ref ] for ref in references ] , [ hyp . value for hyp in hypotheses ] ) return bleu_score