code: def test_google_bleu():
      sentence1 = "the cat sat on the mat"
      sentence2 = "the cat ate the mat"
      import evaluate
  
      google_bleu = evaluate.load("google_bleu")
      result = google_bleu.compute(
          predictions=[sentence1], references=[[sentence2]]
      )
      assert result == {"google_bleu": 0.3333333333333333}
  
      predictions = [
          "It is a guide to action which ensures that the rubber duck always disobeys the commands of the cat",
          "he read the book because he was interested in world history",
      ]
      references = [
          [
              "It is the guiding principle which guarantees the rubber duck forces never being under the command of the cat",
              "It is a guide to action that ensures that the rubber duck will never heed the cat commands",
              "It is the practical guide for the rubber duck army never to heed the directions of the cat",
          ],
          [
              "he was interested in world history because he read the book"
          ],
      ]
      google_bleu = evaluate.load("google_bleu")
      results = google_bleu.compute(
          predictions=predictions,
          references=references,
          min_len=2,
          max_len=6,
      )
      assert round(results["google_bleu"], 2) == 0.4
  
file_path: h2ogpt/tests/test_metrics.py
imports: from tests.utils import wrap_test_forked
label_desc: Use image node_id 14 for calling a global function with example usage: test_google_bleu() without return types