def _text_reference_reader(text_file):
  """Returns list of references in the multi-reference setting.

  Performs lowercasing on each line before returning. Note this file
  is slightly different than the one in totto_parent_eval.py due to how
  we create the list of references.

  Args:
    text_file: String filename.
  """
  single_reference_exists = os.path.isfile(text_file)

  # Check for multi-references.
  multi_reference_paths = glob.glob(text_file + "[0-9]")

  # Either the file should exist or it should correspond to multiple reference
  # files but not both.
  assert ((single_reference_exists or multi_reference_paths) and
          (not single_reference_exists or not multi_reference_paths))

  if single_reference_exists:
    references = _text_reader(text_file)
    return [references]
  else:
    multi_reference_paths = glob.glob(text_file + "[0-9]")
    assert len(multi_reference_paths) == 3
    references0 = _text_reader(multi_reference_paths[0])
    references1 = _text_reader(multi_reference_paths[1])
    references2 = _text_reader(multi_reference_paths[2])

    assert len(references0) == len(references1)
    assert len(references0) == len(references2)
    return [references0, references1, references2]
Returns list of references in the multi-reference setting.

  Performs lowercasing on each line before returning. Note this file
  is slightly different than the one in totto_parent_eval.py due to how
  we create the list of references.

  Args:
    text_file: String filename.
  
language/totto/totto_bleurt_eval.py