code: def bleu_partial(ref_lines, hyp_lines, case_sensitive=False):
      """Compute n-gram statistics for two lists of references and translations."""
      if len(ref_lines) != len(hyp_lines):
          raise ValueError(
              "Reference and translation lists have different numbers of lines."
          )
      if not case_sensitive:
          ref_lines = [x.lower() for x in ref_lines]
          hyp_lines = [x.lower() for x in hyp_lines]
      ref_tokens = [bleu_tokenize(x) for x in ref_lines]
      hyp_tokens = [bleu_tokenize(x) for x in hyp_lines]
      return compute_bleu_matches(ref_tokens, hyp_tokens)
  
file_path: flax/examples/wmt/bleu.py
imports: import collections
  import math
  import re
  import sys
  import unicodedata
  import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: bleu_partial(ref_lines, hyp_lines, case_sensitive) and returns: compute_bleu_matches