class_docstr: DatasetBuilder for bucc dataset.
class_docstr_tok: ["DatasetBuilder","for","bucc","dataset","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, filepath):
      """Yields examples."""
      files = sorted(tf.io.gfile.listdir(filepath))
      target_file = "/"
      source_file = "/"
      source_target_file = "/"
      for file in files:
          if file.endswith("en"):
              target_file = os.path.join(filepath, file)
          elif file.endswith("gold"):
              source_target_file = os.path.join(filepath, file)
          else:
              source_file = os.path.join(filepath, file)
  
      with epath.Path(target_file).open() as f:
          data = csv.reader(f, delimiter="\t")
          target_sentences = list(data)
      with epath.Path(source_file).open() as f:
          data = csv.reader(f, delimiter="\t")
          source_sentences = list(data)
      with epath.Path(source_target_file).open() as f:
          data = csv.reader(f, delimiter="\t")
          source_target_ids = list(data)
      for id_, pair in enumerate(source_target_ids):
          source_id = pair[0]
          target_id = pair[1]
          source_sent = ""
          target_sent = ""
          for i in range(len(source_sentences)):
              if source_sentences[i][0] == source_id:
                  source_sent = source_sentences[i][1]
                  source_id = source_sentences[i][0]
                  break
          for j in range(len(target_sentences)):
              if target_sentences[j][0] == target_id:
                  target_sent = target_sentences[j][1]
                  target_id = target_sentences[j][0]
                  break
          yield id_, {
              "source_sentence": source_sent,
              "target_sentence": target_sent,
              "source_id": source_id,
              "target_id": target_id,
          }
  
file_path: datasets/tensorflow_datasets/datasets/bucc/bucc_dataset_builder.py
imports: import csv
  import os
  from etils import epath
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  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