code: private Matrix loadSparseText(InputStream fileStream) throws IOException {
          Matrix matrix = null;
  
          BufferedReader br = 
                  new BufferedReader(new InputStreamReader(fileStream));
          String line = br.readLine();
          if (line == null)
              throw new IOError(new Throwable(
                          "An empty file has been passed in"));
          String[] dimensions = line.split("\\s");
          int rows = Integer.parseInt(dimensions[0]);
          int columns = Integer.parseInt(dimensions[1]);
  
          int row = 0;
          
          // create a sparse matrix
          matrix = Matrices.create(rows, columns, false);
          while ((line = br.readLine()) != null) {
              String[] termVectorPair = line.split("\\|");
              String[] values = termVectorPair[1].split(",");
              termToIndex.put(termVectorPair[0], row);
  
              // even indicies are columns, odd are the values
              for (int i = 0; i < values.length; i +=2 ) {
                  int col = Integer.parseInt(values[i]);
                  double val = Double.parseDouble(values[i+1]);
                  matrix.set(row, col, val);
              }
              row++;
          }
          return matrix;    
      }
docs: Loads the {@link SemanticSpace} from the text 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#TEXT text} format