code: @Override
      public DataSet next(int num) {
          if (num <= cachedWindow.size())
              return fromCached(num);
          //no more sentences, return the left over
          else if (num >= cachedWindow.size() && !iter.hasNext())
              return fromCached(cachedWindow.size());
  
          //need the next sentence
          else {
              while (cachedWindow.size() < num && iter.hasNext()) {
                  String sentence = iter.nextSentence();
                  if (sentence.isEmpty())
                      continue;
                  List<Window> windows = Windows.windows(sentence, vec.getTokenizerFactory(), vec.getWindow(), vec);
                  if (windows.isEmpty() && !sentence.isEmpty())
                      throw new IllegalStateException("Empty window on sentence");
                  for (Window w : windows)
                      w.setLabel(iter.currentLabel());
                  cachedWindow.addAll(windows);
              }
  
              return fromCached(num);
          }
  
      }
docs: Like the standard next method but allows a
  customizable number of examples returned
  
  @param num the number of examples
  @return the next data applyTransformToDestination