def load_examples(filename):
  """Load SCAN examples from original data file."""
  examples = []

  with gfile.GFile(filename, "r") as input_file:
    for line in input_file:
      splits = line.split("OUT:")
      # Trim "IN:" prefix.
      input_string = splits[0][3:].strip()
      output_string = splits[1].strip()
      examples.append((input_string, output_string))

  return examples
Load SCAN examples from original data file.
language/compgen/nqg/tasks/scan/convert_to_tsv.py