class_docstr: A wrapper around NLTK's NIST implementation.
class_docstr_tok: ["A","wrapper","around","NLTK","'s","NIST","implementation","."]
code: def _compute(
      self,
      predictions,
      references,
      n: int = 5,
      lowercase=False,
      western_lang=True,
  ):
      tokenizer = NISTTokenizer()
  
      # Account for single reference cases: references always need to have one more dimension than predictions
      if isinstance(references[0], str):
          references = [[ref] for ref in references]
  
      predictions = [
          tokenizer.tokenize(
              pred,
              return_str=False,
              lowercase=lowercase,
              western_lang=western_lang,
          )
          for pred in predictions
      ]
      references = [
          [
              tokenizer.tokenize(
                  ref,
                  return_str=False,
                  lowercase=lowercase,
                  western_lang=western_lang,
              )
              for ref in ref_sentences
          ]
          for ref_sentences in references
      ]
      return {
          "nist_mt": corpus_nist(
              list_of_references=references, hypotheses=predictions, n=n
          )
      }
  
file_path: evaluate/metrics/nist_mt/nist_mt.py
imports: from typing import Dict, Optional
  import datasets
  import nltk
  from datasets import Sequence, Value
  from nltk.tokenize.nist import NISTTokenizer
  from nltk.translate.nist_score import corpus_nist, sentence_nist
  import evaluate
label_desc: Use image node_id 2 for calling the NistMt obj's underlying member method code with example usage: obj._compute(predictions, references, n, lowercase, western_lang) and returns: dict