class_docstr: Dataset iterator to create a batch of sequences at different positions.
  
  This iterator returns a pair of the current words and the context words.
class_docstr_tok: ["Dataset","iterator","to","create","a","batch","of","sequences","at","different","positions",".","This","iterator","returns","a","pair","of","the","current","words","and","the","context","words","."]
code: def __init__(self, dataset, window, batch_size, repeat=True):
      self.dataset = np.array(dataset, np.int32)
      self.window = window  # size of context window
      self.batch_size = batch_size
      self._repeat = repeat
      # order is the array which is shuffled ``[window, window + 1, ...,
      # len(dataset) - window - 1]``
      self.order = np.random.permutation(
          len(dataset) - window * 2
      ).astype(np.int32)
      self.order += window
      self.current_position = 0
      # Number of completed sweeps over the dataset. In this case, it is
      # incremented if every word is visited at least once after the last
      # increment.
      self.epoch = 0
      # True if the epoch is incremented at the last iteration.
      self.is_new_epoch = False
  
imports: import argparse
  import collections
  import os
  import six
  import warnings
  import numpy
  import chainer
  from chainer.backends import cuda
  import chainer.functions
  import chainer.initializers
  import chainer.links
  import chainer.optimizers
  from chainer import reporter
  from chainer import training
  from chainer.training import extensions
label_desc: Use image node_id 1 to create a new WindowIterator object from inherited base classes: chainer.dataset with example: obj = WindowIterator(dataset, window, batch_size, repeat)