def get_hover_dataset(data_root, split):
  """Gets a tf.data.Dataset for FEVER."""
  filename = _HOVER_SPLIT_TO_FILENAME[split]
  dataset_path = os.path.join(data_root, "hover", filename)

  with tf.io.gfile.GFile(dataset_path) as f:
    data = json.load(f)
  tf.logging.info("Loaded %d samples from %s" % (len(data), dataset_path))

  dataset = tf.data.Dataset.from_tensor_slices(
      dict(
          question=[row["claim"] for row in data],
          answers=[
              tf.cast(_HOVER_LABEL_DICT[row["label"]], tf.int64) for row in data
          ]))

  if split == "train":
    dataset = dataset.shuffle(len(data))
  return dataset
Gets a tf.data.Dataset for FEVER.
language/orqa/datasets/text_classification_dataset.py