class_docstr: DAta Record to Text Generation.
class_docstr_tok: ["DAta","Record","to","Text","Generation","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, json_file):
      """Yields examples."""
      with epath.Path(json_file).open() as f:
          data = json.load(f)
          for entry_count, entry in enumerate(data):
              table = []
              for i, triple_set in enumerate(entry["tripleset"]):
                  for header, content in zip(
                      ["subject", "predicate", "object"], triple_set
                  ):
                      table.append(
                          {
                              "column_header": header,
                              "row_number": i,
                              "content": content,
                          }
                      )
              for annotation_count, annotation in enumerate(
                  entry["annotations"]
              ):
                  yield "{}_{}".format(entry_count, annotation_count), {
                      "input_text": {
                          "table": table,
                      },
                      "target_text": annotation["text"],
                  }
  
file_path: datasets/tensorflow_datasets/structured/dart/dart.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 Dart obj's underlying member method code with example usage: obj._generate_examples(json_file) without return types