class_docstr: Reads a JSON-formatted SQuAD file and returns a ``Dataset`` where the ``Instances`` have four
  fields: ``question``, a ``TextField``, ``passage``, another ``TextField``, and ``span_start``
  and ``span_end``, both ``IndexFields`` into the ``passage`` ``TextField``.  We also add a
  ``MetadataField`` that stores the instance's ID, the original passage text, gold answer strings,
  and token offsets into the original passage, accessible as ``metadata['id']``,
  ``metadata['original_passage']``, ``metadata['answer_texts']`` and
  ``metadata['token_offsets']``.  This is so that we can more easily use the official SQuAD
  evaluation script to get metrics.
  
  Parameters
  ----------
  tokenizer : ``Tokenizer``, optional (default=``WordTokenizer()``)
      We use this ``Tokenizer`` for both the question and the passage.  See :class:`Tokenizer`.
      Default is ```WordTokenizer()``.
  token_indexers : ``Dict[str, TokenIndexer]``, optional
      We similarly use this for both the question and the passage.  See :class:`TokenIndexer`.
      Default is ``{"tokens": SingleIdTokenIndexer()}``.
code: def __init__(self, tokenizer=None, token_indexers=None, lazy=False):
      super(SquadReader, self).__init__(lazy)
      self._tokenizer = tokenizer or WordTokenizer()
      self._token_indexers = token_indexers or {
          "tokens": SingleIdTokenIndexer()
      }
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/dataset_readers/reading_comprehension/squad.py
imports: from __future__ import with_statement
  from __future__ import absolute_import
  import json
  import logging
  from allennlp.common.file_utils import cached_path
  from allennlp.data.dataset_readers.dataset_reader import DatasetReader
  from allennlp.data.instance import Instance
  from allennlp.data.dataset_readers.reading_comprehension import util
  from allennlp.data.token_indexers import SingleIdTokenIndexer, TokenIndexer
  from allennlp.data.tokenizers import Token, Tokenizer, WordTokenizer
  from io import open
label_desc: Use image node_id 1 to create a new SquadReader object from inherited base classes: DatasetReader with example: obj = SquadReader(tokenizer, token_indexers, lazy)