def compute_bleu(meters):
    import inspect
    import sacrebleu
    fn_sig = inspect.getfullargspec(sacrebleu.compute_bleu)[0]
    if ('smooth_method' in fn_sig):
        smooth = {'smooth_method': 'exp'}
    else:
        smooth = {'smooth': 'exp'}
    bleu = sacrebleu.compute_bleu(correct=meters['_bleu_counts'].sum, total=meters['_bleu_totals'].sum, sys_len=meters['_bleu_sys_len'].sum, ref_len=meters['_bleu_ref_len'].sum, **smooth)
    return round(bleu.score, 2)
def compute_bleu(meters):
    import inspect
    import sacrebleu
    fn_sig = inspect.getfullargspec(sacrebleu.compute_bleu)[0]
    if ('smooth_method' in fn_sig):
        smooth = {'smooth_method': 'exp'}
    else:
        smooth = {'smooth': 'exp'}
    bleu = sacrebleu.compute_bleu(correct=meters['_bleu_counts'].sum, total=meters['_bleu_totals'].sum, sys_len=meters['_bleu_sys_len'].sum, ref_len=meters['_bleu_ref_len'].sum, **smooth)
    return round(bleu.score, 2)