docstr: Create dataset objects for splits of the WikiText-2 dataset.
  
  This is the most flexible way to use the dataset.
  
  Args:
      text_field: The field that will be used for text data.
      root: The root directory that the dataset's zip archive will be
          expanded into; therefore the directory in whose wikitext-2
          subdirectory the data files will be stored.
      train: The filename of the train data. Default: 'wiki.train.tokens'.
      validation: The filename of the validation data, or None to not
          load the validation set. Default: 'wiki.valid.tokens'.
      test: The filename of the test data, or None to not load the test
          set. Default: 'wiki.test.tokens'.
docstr_tok: ["Create","dataset","objects","for","splits","of","the","WikiText-2","dataset",".","This","is","the","most","flexible","way","to","use","the","dataset",".","Args",":","text_field",":","The","field","that","will","be","used","for","text","data",".","root",":","The","root","directory","that","the","dataset","'s","zip","archive","will","be","expanded","into",";","therefore","the","directory","in","whose","wikitext-2","subdirectory","the","data","files","will","be","stored",".","train",":","The","filename","of","the","train","data",".","Default",":","'wiki.train.tokens","'",".","validation",":","The","filename","of","the","validation","data",",","or","None","to","not","load","the","validation","set",".","Default",":","'wiki.valid.tokens","'",".","test",":","The","filename","of","the","test","data",",","or","None","to","not","load","the","test","set",".","Default",":","'wiki.test.tokens","'","."]
code: def splits(
      cls,
      text_field,
      root=".data",
      train="wiki.train.tokens",
      validation="wiki.valid.tokens",
      test="wiki.test.tokens",
      **kwargs,
  ):
      """Create dataset objects for splits of the WikiText-2 dataset.
  
      This is the most flexible way to use the dataset.
  
      Args:
          text_field: The field that will be used for text data.
          root: The root directory that the dataset's zip archive will be
              expanded into; therefore the directory in whose wikitext-2
              subdirectory the data files will be stored.
          train: The filename of the train data. Default: 'wiki.train.tokens'.
          validation: The filename of the validation data, or None to not
              load the validation set. Default: 'wiki.valid.tokens'.
          test: The filename of the test data, or None to not load the test
              set. Default: 'wiki.test.tokens'.
      """
      return super(WikiText2, cls).splits(
          root=root,
          train=train,
          validation=validation,
          test=test,
          text_field=text_field,
          **kwargs,
      )
  
file_path: pytext/pytext/legacy/datasets/language_modeling.py
imports: import io
  from ..None import data
label_desc: Use image node_id 1 for calling the WikiText2 obj's underlying member method code with example usage: obj.splits(cls, text_field, root, train, validation, test) and returns: super