class_docstr: Movie reviews with human annotated rationales.
docstr: Yields examples.
docstr_tok: ["Yields","examples","."]
code: def _generate_examples(self, data_dir, filepath):
      """Yields examples."""
      reviews_dir = os.path.join(data_dir, "docs")
  
      with epath.Path(filepath).open() as f:
          for line in f:
              row = json.loads(line)
              doc_id = row["annotation_id"]
              review_file = os.path.join(reviews_dir, doc_id)
              with epath.Path(review_file).open() as f1:
                  review_text = f1.read()
  
              evidences = []
              for evidence in row["evidences"]:
                  for e in evidence:
                      evidences.append(e["text"])
  
              yield doc_id, {
                  "review": review_text,
                  "label": row["classification"],
                  "evidences": evidences,
              }
  
file_path: datasets/tensorflow_datasets/text/movie_rationales.py
imports: import json
  import os
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the MovieRationales obj's underlying member method code with example usage: obj._generate_examples(data_dir, filepath) without return types