class_docstr: WebQuestions Benchmark for Question Answering.
docstr: Parses split file and yields examples.
docstr_tok: ["Parses","split","file","and","yields","examples","."]
code: def _generate_examples(self, file_path):
      """Parses split file and yields examples."""
  
      def _target_to_answers(target):
          target = re.sub(r"^\(list |\)$", "", target)
          return [
              "".join(ans)
              for ans in re.findall(
                  r'\(description (?:"([^"]+?)"|([^)]+?))\)\w*', target
              )
          ]
  
      with epath.Path(file_path).open() as f:
          examples = json.load(f)
          for i, ex in enumerate(examples):
              yield i, {
                  "url": ex["url"],
                  "question": ex["utterance"],
                  "answers": _target_to_answers(ex["targetValue"]),
              }
  
file_path: datasets/tensorflow_datasets/question_answering/web_questions.py
imports: import json
  import re
  from etils import epath
  import tensorflow_datasets.public_api
label_desc: Use image node_id 3 for calling the WebQuestions obj's underlying member method code with example usage: obj._generate_examples(file_path) and returns: unknown