class_docstr: Extreme Summarization (XSum) Dataset.
class_docstr_tok: ["Extreme","Summarization","(","XSum",")","Dataset","."]
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, split_ids=None, path=None):
      """Yields examples."""
      missing = 0
      total_num = len(split_ids)
      for i in split_ids:
          filename = os.path.join(path, i + ".data")
          if tf.io.gfile.exists(filename):
              with epath.Path(filename).open() as f:
                  text = "".join(
                      [
                          line
                          for line in f.readlines()
                          if line not in _REMOVE_LINES and line.strip()
                      ]
                  )
                  # Each file follows below format:
                  # [XSUM]URL[XSUM]
                  # http://somelink
                  #
                  # [XSUM]INTRODUCTION[XSUM]
                  # some intro
                  #
                  # [XSUM]RESTBODY[XSUM]
                  # text line.
                  # another text line.
                  # "another text line."
                  segs = text.split("[XSUM]")
                  yield i, {
                      _DOCUMENT: segs[6].strip(),
                      _SUMMARY: segs[4].strip(),
                  }
          else:
              missing += 1
              logging.info("id %s missing.", i)
      if missing:
          logging.warning(
              "%d out of %d examples are missing.", missing, total_num
          )
  
file_path: datasets/tensorflow_datasets/summarization/xsum.py
imports: import json
  import os
  from absl import logging
  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 Xsum obj's underlying member method code with example usage: obj._generate_examples(split_ids, path) without return types