code: public static INDArray asExampleArray(Window window, Word2Vec vec, boolean normalize) {
          int length = vec.lookupTable().layerSize();
          List<String> words = window.getWords();
          int windowSize = vec.getWindow();
          Preconditions.checkState(words.size() == vec.getWindow());
          INDArray ret = Nd4j.create(1, length * windowSize);
  
  
  
          for (int i = 0; i < words.size(); i++) {
              String word = words.get(i);
              INDArray n = normalize ? vec.getWordVectorMatrixNormalized(word) : vec.getWordVectorMatrix(word);
              ret.put(new INDArrayIndex[] {NDArrayIndex.interval(i * vec.lookupTable().layerSize(),
                              i * vec.lookupTable().layerSize() + vec.lookupTable().layerSize())}, n);
          }
  
          return ret;
      }
docs: Converts a window (each word in the window)
  
  in to a vector.
  
  Keep in mind each window is a multi word context.
  
  From there, each word uses the passed in model
  as a lookup table to get what vectors are relevant
  to the passed in windows
  @param window the window to take in.
  @param vec the model to use as a lookup table
  @return a concacneated 1 row array
  containing all of the numbers for each word in the window