class_docstr: Read a tsv file containing paired sequences, and create a dataset suitable for a
  ``SimpleSeq2Seq`` model, or any model with a matching API.
  
  Expected format for each input line: <source_sequence_string>       <target_sequence_string>
  
  The output of ``read`` is a list of ``Instance`` s with the fields:
      source_tokens: ``TextField`` and
      target_tokens: ``TextField``
  
  `START_SYMBOL` and `END_SYMBOL` tokens are added to the source and target sequences.
  
  Parameters
  ----------
  source_tokenizer : ``Tokenizer``, optional
      Tokenizer to use to split the input sequences into words or other kinds of tokens. Defaults
      to ``WordTokenizer()``.
  target_tokenizer : ``Tokenizer``, optional
      Tokenizer to use to split the output sequences (during training) into words or other kinds
      of tokens. Defaults to ``source_tokenizer``.
  source_token_indexers : ``Dict[str, TokenIndexer]``, optional
      Indexers used to define input (source side) token representations. Defaults to
      ``{"tokens": SingleIdTokenIndexer()}``.
  target_token_indexers : ``Dict[str, TokenIndexer]``, optional
      Indexers used to define output (target side) token representations. Defaults to
      ``source_token_indexers``.
  source_add_start_token : bool, (optional, default=True)
      Whether or not to add `START_SYMBOL` to the beginning of the source sequence.
class_docstr_tok: ["Read","a","tsv","file","containing","paired","sequences",",","and","create","a","dataset","suitable","for","a","``","SimpleSeq2Seq","``","model",",","or","any","model","with","a","matching","API",".","Expected","format","for","each","input","line",":","<","source_sequence_string",">","<","target_sequence_string",">","The","output","of","``","read","``","is","a","list","of","``","Instance","``","s","with","the","fields",":","source_tokens",":","``","TextField","``","and","target_tokens",":","``","TextField","``","`","START_SYMBOL","`","and","`","END_SYMBOL","`","tokens","are","added","to","the","source","and","target","sequences",".","Parameters","--","--","--","--","--","source_tokenizer",":","``","Tokenizer","``",",","optional","Tokenizer","to","use","to","split","the","input","sequences","into","words","or","other","kinds","of","tokens",".","Defaults","to","``","WordTokenizer","(",")","``",".","target_tokenizer",":","``","Tokenizer","``",",","optional","Tokenizer","to","use","to","split","the","output","sequences","(","during","training",")","into","words","or","other","kinds","of","tokens",".","Defaults","to","``","source_tokenizer","``",".","source_token_indexers",":","``","Dict","[","str",",","TokenIndexer","]","``",",","optional","Indexers","used","to","define","input","(","source","side",")","token","representations",".","Defaults","to","``","{","``","tokens","''",":","SingleIdTokenIndexer","(",")","}","``",".","target_token_indexers",":","``","Dict","[","str",",","TokenIndexer","]","``",",","optional","Indexers","used","to","define","output","(","target","side",")","token","representations",".","Defaults","to","``","source_token_indexers","``",".","source_add_start_token",":","bool",",","(","optional",",","default=True",")","Whether","or","not","to","add","`","START_SYMBOL","`","to","the","beginning","of","the","source","sequence","."]
code: def __init__(
      self,
      source_tokenizer=None,
      target_tokenizer=None,
      source_token_indexers=None,
      target_token_indexers=None,
      source_add_start_token=True,
      lazy=False,
  ):
      super(Seq2SeqDatasetReader, self).__init__(lazy)
      self._source_tokenizer = source_tokenizer or WordTokenizer()
      self._target_tokenizer = (
          target_tokenizer or self._source_tokenizer
      )
      self._source_token_indexers = source_token_indexers or {
          "tokens": SingleIdTokenIndexer()
      }
      self._target_token_indexers = (
          target_token_indexers or self._source_token_indexers
      )
      self._source_add_start_token = source_add_start_token
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/dataset_readers/seq2seq.py
imports: from __future__ import with_statement
  from __future__ import absolute_import
  import logging
  from allennlp.common.checks import ConfigurationError
  from allennlp.common.file_utils import cached_path
  from allennlp.common.util import START_SYMBOL, END_SYMBOL
  from allennlp.data.dataset_readers.dataset_reader import DatasetReader
  from allennlp.data.fields import TextField
  from allennlp.data.instance import Instance
  from allennlp.data.tokenizers import Token, Tokenizer, WordTokenizer
  from allennlp.data.token_indexers import TokenIndexer, SingleIdTokenIndexer
  from io import open
label_desc: Use image node_id 1 to create a new Seq2SeqDatasetReader object from inherited base classes: DatasetReader with example: obj = Seq2SeqDatasetReader(source_tokenizer, target_tokenizer, source_token_indexers, target_token_indexers, source_add_start_token, lazy)