Generate mnli examples.

  Args:
    filename: a string
  Yields:
    dictionaries containing "premise", "hypothesis" and "label" strings

def _example_generator(filename):
  """Generate mnli examples.

  Args:
    filename: a string
  Yields:
    dictionaries containing "premise", "hypothesis" and "label" strings
  """
  for idx, line in enumerate(tf.gfile.Open(filename, "rb")):
    if idx == 0: continue  # skip header
    line = text_encoder.to_unicode_utf8(line.strip())
    split_line = line.split("\t")
    # Works for both splits even though dev has some extra human labels.
    yield {
        "premise": split_line[8],
        "hypothesis": split_line[9],
        "label": split_line[-1]
    }