class_docstr: Dataset iterator for multiparagraph-SQuAD dataset.
  
  With ``with_answer_rate`` rate samples context with answer and with ``1 - with_answer_rate`` samples context
  from the same article, but without an answer. Contexts without an answer are sampled according to
  their tfidf scores (tfidf score between question and context).
  
  It extracts ``context``, ``question``, ``answer_text`` and ``answer_start`` position from dataset.
  Example from a dataset is a tuple of ``(context, question)`` and ``(answer_text, answer_start)``. If there is
  no answer in context, then ``answer_text`` is empty string and `answer_start` is equal to -1.
  
  Args:
      data: dict with keys ``'train'``, ``'valid'`` and ``'test'`` and values
      seed: random seed for data shuffling
      shuffle: whether to shuffle data during batching
      with_answer_rate: sampling rate of contexts with answer
  
  Attributes:
      shuffle: whether to shuffle data during batching
      random: instance of ``Random`` initialized with a seed
class_docstr_tok: ["Dataset","iterator","for","multiparagraph-SQuAD","dataset",".","With","``","with_answer_rate","``","rate","samples","context","with","answer","and","with","``","1","-","with_answer_rate","``","samples","context","from","the","same","article",",","but","without","an","answer",".","Contexts","without","an","answer","are","sampled","according","to","their","tfidf","scores","(","tfidf","score","between","question","and","context",")",".","It","extracts","``","context","``",",","``","question","``",",","``","answer_text","``","and","``","answer_start","``","position","from","dataset",".","Example","from","a","dataset","is","a","tuple","of","``","(","context",",","question",")","``","and","``","(","answer_text",",","answer_start",")","``",".","If","there","is","no","answer","in","context",",","then","``","answer_text","``","is","empty","string","and","`","answer_start","`","is","equal","to","-1",".","Args",":","data",":","dict","with","keys","``","'train","'","``",",","``","'valid","'","``","and","``","'test","'","``","and","values","seed",":","random","seed","for","data","shuffling","shuffle",":","whether","to","shuffle","data","during","batching","with_answer_rate",":","sampling","rate","of","contexts","with","answer","Attributes",":","shuffle",":","whether","to","shuffle","data","during","batching","random",":","instance","of","``","Random","``","initialized","with","a","seed"]
code: def __init__(
      self,
      data,
      seed: Optional[int] = None,
      shuffle: bool = True,
      with_answer_rate: float = 0.666,
      *args,
      **kwargs,
  ) -> None:
      self.with_answer_rate = with_answer_rate
      self.seed = seed
      self.np_random = np.random.RandomState(seed)
      super().__init__(data, seed, shuffle, *args, **kwargs)
  
file_path: DeepPavlov/deeppavlov/dataset_iterators/squad_iterator.py
imports: import json
  from typing import Dict, Any, List, Tuple, Generator, Optional
  import numpy
  from deeppavlov.core.common.registry import register
  from deeppavlov.core.data.data_learning_iterator import DataLearningIterator
label_desc: Use image node_id 1 to create a new MultiSquadIterator object from inherited base classes: DataLearningIterator with example: obj = MultiSquadIterator(data, seed, shuffle, with_answer_rate)