@staticmethod
def compute(guess: str, answers: List[str], k: int=4) -> Optional['BleuMetric']:
    '\n        Compute approximate BLEU score between guess and a set of answers.\n        '
    if (nltkbleu is None):
        return None
    weights = [(1 / k) for _ in range(k)]
    score = nltkbleu.sentence_bleu([normalize_answer(a).split(' ') for a in answers], normalize_answer(guess).split(' '), smoothing_function=nltkbleu.SmoothingFunction(epsilon=1e-12).method1, weights=weights)
    return BleuMetric(score)
Compute approximate BLEU score between guess and a set of answers.
@staticmethod
def compute(guess: str, answers: List[str], k: int=4) -> Optional['BleuMetric']:
    '\n        \n        '
    if (nltkbleu is None):
        return None
    weights = [(1 / k) for _ in range(k)]
    score = nltkbleu.sentence_bleu([normalize_answer(a).split(' ') for a in answers], normalize_answer(guess).split(' '), smoothing_function=nltkbleu.SmoothingFunction(epsilon=1e-12).method1, weights=weights)
    return BleuMetric(score)