code: private Matrix loadSparseBinary(InputStream fileStream) throws IOException {
          DataInputStream dis = new DataInputStream(fileStream);
          int rows = dis.readInt();
          int cols = dis.readInt();
          // Create the sparse matrix as individual rows since we can fully
          // allocate the indices values at once, rather than pay the log(n)
          // overhead of sorting them
          CompactSparseVector[] rowVectors = new CompactSparseVector[rows];
  
          for (int row = 0; row < rows; ++row) {
              String word = dis.readUTF();
              termToIndex.put(word, row);
              
              int nonZero = dis.readInt();
              int[] indices = new int[nonZero];
              double[] values = new double[nonZero];
              for (int i = 0; i < nonZero; ++i) {
                  int nz = dis.readInt();
                  double val = dis.readDouble();
                  indices[i] = nz;
                  values[i] = val;
              }
              rowVectors[row] = new CompactSparseVector(indices, values, cols);
          }
          return Matrices.asSparseMatrix(Arrays.asList(rowVectors));
      }
docs: Loads the {@link SemanticSpace} from the binary formatted file, adding
  its words to {@link #termToIndex} and returning the {@code Matrix}
  containing the space's vectors.
  
  @param sspaceFile a file in {@link SSpaceFormat#BINARY binary} format