class_docstr: Defines a dataset composed of Examples along with its Fields.
  
  Attributes:
      sort_key (callable): A key to use for sorting dataset examples for batching
          together examples with similar lengths to minimize padding.
      examples (list(Example)): The examples in this dataset.
          fields: A dictionary containing the name of each column together with
          its corresponding Field object. Two columns with the same Field
          object will share a vocabulary.
      fields (dict[str, Field]): Contains the name of each column or field, together
          with the corresponding Field object. Two fields with the same Field object
          will have a shared vocabulary.
class_docstr_tok: ["Defines","a","dataset","composed","of","Examples","along","with","its","Fields",".","Attributes",":","sort_key","(","callable",")",":","A","key","to","use","for","sorting","dataset","examples","for","batching","together","examples","with","similar","lengths","to","minimize","padding",".","examples","(","list","(","Example",")",")",":","The","examples","in","this","dataset",".","fields",":","A","dictionary","containing","the","name","of","each","column","together","with","its","corresponding","Field","object",".","Two","columns","with","the","same","Field","object","will","share","a","vocabulary",".","fields","(","dict","[","str",",","Field","]",")",":","Contains","the","name","of","each","column","or","field",",","together","with","the","corresponding","Field","object",".","Two","fields","with","the","same","Field","object","will","have","a","shared","vocabulary","."]
docstr: Create Dataset objects for multiple splits of a dataset.
  
  Arguments:
      path (str): Common prefix of the splits' file paths, or None to use
          the result of cls.download(root).
      root (str): Root dataset storage directory. Default is '.data'.
      train (str): Suffix to add to path for the train set, or None for no
          train set. Default is None.
      validation (str): Suffix to add to path for the validation set, or None
          for no validation set. Default is None.
      test (str): Suffix to add to path for the test set, or None for no test
          set. Default is None.
      Remaining keyword arguments: Passed to the constructor of the
          Dataset (sub)class being used.
  
  Returns:
      split_datasets (tuple(Dataset)): Datasets for train, validation, and
          test splits in that order, if provided.
docstr_tok: ["Create","Dataset","objects","for","multiple","splits","of","a","dataset",".","Arguments",":","path","(","str",")",":","Common","prefix","of","the","splits","'","file","paths",",","or","None","to","use","the","result","of","cls.download","(","root",")",".","root","(","str",")",":","Root","dataset","storage","directory",".","Default","is","'.data","'",".","train","(","str",")",":","Suffix","to","add","to","path","for","the","train","set",",","or","None","for","no","train","set",".","Default","is","None",".","validation","(","str",")",":","Suffix","to","add","to","path","for","the","validation","set",",","or","None","for","no","validation","set",".","Default","is","None",".","test","(","str",")",":","Suffix","to","add","to","path","for","the","test","set",",","or","None","for","no","test","set",".","Default","is","None",".","Remaining","keyword","arguments",":","Passed","to","the","constructor","of","the","Dataset","(","sub",")","class","being","used",".","Returns",":","split_datasets","(","tuple","(","Dataset",")",")",":","Datasets","for","train",",","validation",",","and","test","splits","in","that","order",",","if","provided","."]
code: def splits(
      cls,
      path=None,
      root=".data",
      train=None,
      validation=None,
      test=None,
      **kwargs,
  ):
      """Create Dataset objects for multiple splits of a dataset.
  
      Arguments:
          path (str): Common prefix of the splits' file paths, or None to use
              the result of cls.download(root).
          root (str): Root dataset storage directory. Default is '.data'.
          train (str): Suffix to add to path for the train set, or None for no
              train set. Default is None.
          validation (str): Suffix to add to path for the validation set, or None
              for no validation set. Default is None.
          test (str): Suffix to add to path for the test set, or None for no test
              set. Default is None.
          Remaining keyword arguments: Passed to the constructor of the
              Dataset (sub)class being used.
  
      Returns:
          split_datasets (tuple(Dataset)): Datasets for train, validation, and
              test splits in that order, if provided.
      """
      if path is None:
          path = cls.download(root)
      train_data = (
          None
          if train is None
          else cls(os.path.join(path, train), **kwargs)
      )
      val_data = (
          None
          if validation is None
          else cls(os.path.join(path, validation), **kwargs)
      )
      test_data = (
          None
          if test is None
          else cls(os.path.join(path, test), **kwargs)
      )
      return tuple(
          d for d in (train_data, val_data, test_data) if d is not None
      )
  
file_path: decanlp/text/torchtext/data/dataset.py
imports: import io
  import os
  import zipfile
  import tarfile
  import torch.utils.data
  from .example import Example
  from ..utils import download_from_url
label_desc: Use image node_id 2 for calling the Dataset obj's underlying member method code with example usage: obj.splits(cls, path, root, train, validation, test) and returns: tuple