docs: public static Pair<InMemoryLookupTable, VocabCache> loadTxt(File vectorsFile)
              throws IOException, UnsupportedEncodingException {
  
          AbstractCache cache = new AbstractCache<>();
          BufferedReader reader = createReader(vectorsFile);
          LineIterator iter = IOUtils.lineIterator(reader);
          String line = null;
          boolean hasHeader = false;
          if (iter.hasNext()) {
              line = iter.nextLine(); // skip header line
              //look for spaces
              if (!line.contains(" ")) {
                  log.debug("Skipping first line");
                  hasHeader = true;
              } else {
                  // we should check for something that looks like proper word vectors here. i.e: 1 word at the 0 position, and bunch of floats further
                  String[] split = line.split(" ");
                  try {
                      long[] header = new long[split.length];
                      for (int x = 0; x < split.length; x++) {
                          header[x] = Long.parseLong(split[x]);
                      }
                      if (split.length < 4)
                          hasHeader = true;
                      // now we know, if that's all ints - it's just a header
                      // [0] - number of words
                      // [1] - vectorSize
                      // [2] - number of documents <-- DL4j-only value
                      if (split.length == 3)
                          cache.incrementTotalDocCount(header[2]);
  
                      printOutProjectedMemoryUse(header[0], (int) header[1], 1);
  
                      hasHeader = true;
  
                      try {
                          reader.close();
                      } catch (Exception ex) {
                      }
                  } catch (Exception e) {
                      // if any conversion exception hits - that'll be considered header
                      hasHeader = false;
  
                  }
              }
  
          }
  
          //reposition buffer to be one line ahead
          if (hasHeader) {
              line = "";
              iter.close();
              //reader = new BufferedReader(new FileReader(vectorsFile));
              reader = createReader(vectorsFile);
              iter = IOUtils.lineIterator(reader);
              iter.nextLine();
          }
  
          List<INDArray> arrays = new ArrayList<>();
          long[] vShape = new long[]{1, -1};
          while (iter.hasNext()) {
              if (line.isEmpty())
                  line = iter.nextLine();
              String[] split = line.split(" ");
              String word = decodeB64(split[0]); //split[0].replaceAll(whitespaceReplacement, " ");
              VocabWord word1 = new VocabWord(1.0, word);
  
              word1.setIndex(cache.numWords());
  
              cache.addToken(word1);
  
              cache.addWordToIndex(word1.getIndex(), word);
  
              cache.putVocabWord(word);
  
              float[] vector = new float[split.length - 1];
  
              for (int i = 1; i < split.length; i++) {
                  vector[i - 1] = Float.parseFloat(split[i]);
              }
  
              vShape[1] = vector.length;
              INDArray row = Nd4j.create(vector, vShape);
  
              arrays.add(row);
  
              // workaround for skipped first row
              line = "";
          }
  
          INDArray syn = Nd4j.vstack(arrays);
  
          InMemoryLookupTable lookupTable =
                  (InMemoryLookupTable) new InMemoryLookupTable.Builder().vectorLength(arrays.get(0).columns())
                          .useAdaGrad(false).cache(cache).useHierarchicSoftmax(false).build();
  
          lookupTable.setSyn0(syn);
  
          iter.close();
  
          try {
              reader.close();
          } catch (Exception e) {
          }
  
          return new Pair<>(lookupTable, (VocabCache) cache);
      }