class_docstr: The Penn Treebank dataset.
  A relatively small dataset originally created for POS tagging.
  
  References:
  Marcus, Mitchell P., Marcinkiewicz, Mary Ann & Santorini, Beatrice (1993).
  Building a Large Annotated Corpus of English: The Penn Treebank
class_docstr_tok: ["The","Penn","Treebank","dataset",".","A","relatively","small","dataset","originally","created","for","POS","tagging",".","References",":","Marcus",",","Mitchell","P.",",","Marcinkiewicz",",","Mary","Ann","&","Santorini",",","Beatrice","(","1993",")",".","Building","a","Large","Annotated","Corpus","of","English",":","The","Penn","Treebank"]
docstr: Create iterator objects for splits of the Penn Treebank dataset.
  
  This is the simplest way to use the dataset, and assumes common
  defaults for field, vocabulary, and iterator parameters.
  
  Args:
      batch_size: Batch size.
      bptt_len: Length of sequences for backpropagation through time.
      device: Device to create batches on. Use -1 for CPU and None for
          the currently active GPU device.
      root: The root directory where the data files will be stored.
      vectors: One of either the available pretrained vectors
          or custom pretrained vectors (see Vocab.load_vectors);
          or a list of aforementioned vectors
      kwargs: Passed to the splits method.
docstr_tok: ["Create","iterator","objects","for","splits","of","the","Penn","Treebank","dataset",".","This","is","the","simplest","way","to","use","the","dataset",",","and","assumes","common","defaults","for","field",",","vocabulary",",","and","iterator","parameters",".","Args",":","batch_size",":","Batch","size",".","bptt_len",":","Length","of","sequences","for","backpropagation","through","time",".","device",":","Device","to","create","batches","on",".","Use","-1","for","CPU","and","None","for","the","currently","active","GPU","device",".","root",":","The","root","directory","where","the","data","files","will","be","stored",".","vectors",":","One","of","either","the","available","pretrained","vectors","or","custom","pretrained","vectors","(","see","Vocab.load_vectors",")",";","or","a","list","of","aforementioned","vectors","kwargs",":","Passed","to","the","splits","method","."]
code: def iters(
      cls,
      batch_size=32,
      bptt_len=35,
      device=0,
      root=".data",
      vectors=None,
      **kwargs,
  ):
      """Create iterator objects for splits of the Penn Treebank dataset.
  
      This is the simplest way to use the dataset, and assumes common
      defaults for field, vocabulary, and iterator parameters.
  
      Args:
          batch_size: Batch size.
          bptt_len: Length of sequences for backpropagation through time.
          device: Device to create batches on. Use -1 for CPU and None for
              the currently active GPU device.
          root: The root directory where the data files will be stored.
          vectors: One of either the available pretrained vectors
              or custom pretrained vectors (see Vocab.load_vectors);
              or a list of aforementioned vectors
          kwargs: Passed to the splits method.
      """
      TEXT = data.Field()
  
      train, val, test = cls.splits(TEXT, root=root, **kwargs)
  
      TEXT.build_vocab(train, vectors=vectors)
  
      return data.BPTTIterator.splits(
          (train, val, test),
          batch_size=batch_size,
          bptt_len=bptt_len,
          device=device,
      )
  
file_path: pytext/pytext/legacy/datasets/language_modeling.py
imports: import io
  from ..None import data
label_desc: Use image node_id 2 for calling the PennTreebank obj's underlying member method code with example usage: obj.iters(cls, batch_size, bptt_len, device, root, vectors) and returns: data