def get_fever_dataset(data_root, split):
  """Gets a tf.data.Dataset for FEVER."""
  filename = _FEVER_SPLIT_TO_FILENAME[split]
  dataset_path = os.path.join(data_root, "fever", filename)
  dataset = tf.data.TextLineDataset(dataset_path)
  dataset = dataset.map(parse_fever_line, num_parallel_calls=12)

  if split == "train":
    with tf.io.gfile.GFile(dataset_path) as f:
      dataset_size = sum(1 for _ in f)
    dataset = dataset.shuffle(dataset_size)
  return dataset
Gets a tf.data.Dataset for FEVER.
language/orqa/datasets/text_classification_dataset.py