code: private int loadTextOffsets(RandomAccessBufferedReader textSSpace) 
              throws IOException {
          String line = textSSpace.readLine();
          if (line == null)
              throw new IOError(new Throwable(
                          "An empty file has been passed in"));
  
          // Strip off the 4-byte (2 char) header
          if (containsHeader)
              line = line.substring(4);
          String[] dimensionStrs = line.split("\\s");
          int dimensions = Integer.parseInt(dimensionStrs[1]);
  
          int row = 1;    
          while ((line = textSSpace.readLine()) != null) {
              String[] termVectorPair = line.split("\\|");
              termToOffset.put(termVectorPair[0], Long.valueOf(row));
              row++;
          }
  
          return dimensions;
      }
docs: Loads the {@link SemanticSpace} from the {@code TEXT} formatted file,
  adding its words to {@link #termToOffset} and returning the number of
  dimensions for each vector
  
  @param textSSpace a file in {@link SSpaceFormat#TEXT text} format
  
  @return the number of dimensions for vectors in the loaded semantic space