class_docstr: DatasetBuilder for answer_equivalence dataset.
class_docstr_tok: ["DatasetBuilder","for","answer_equivalence","dataset","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, filepath):
      """Yields examples."""
      with epath.Path(filepath).open() as fin:
          for i, line in enumerate(fin):
              data = json.loads(line)
              sample_id = data["qid"] + f"_{i}"
              sample = {
                  "qid": data["qid"],
                  "gold_index": data["gold_index"],
                  "context": data["context"],
                  "question": data["question"],
                  "reference": data["reference"],
                  "candidate": data["candidate"],
                  "score": data["score"],
              }
              for j in range(4):
                  sample[f"question_{j+1}"] = data["raw_rating"][j]
              yield sample_id, sample
  
file_path: datasets/tensorflow_datasets/datasets/answer_equivalence/answer_equivalence_dataset_builder.py
imports: from __future__ import annotations
  import json
  import os
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the Builder obj's underlying member method code with example usage: obj._generate_examples(filepath) without return types