code: public void processSpace(Properties properties) {
  
          // Set all of the default properties
          int dimensions = 300; 
  
          // Then load any of the user-specified properties
          String dimensionsProp = 
              properties.getProperty(LPCS_DIMENSIONS_PROPERTY);
          if (dimensionsProp != null) {
              try {
                  dimensions = Integer.parseInt(dimensionsProp);
              } catch (NumberFormatException nfe) {
                  throw new IllegalArgumentException(
                      LPCS_DIMENSIONS_PROPERTY + " is not an integer: " +
                      dimensionsProp);
              }
          }
          
          try {
              LOGGER.info("reducing to " + dimensions + " dimensions");
              File tiMap = new File("lpcs-term-index." + Math.random() + ".map");
              PrintWriter pw = new PrintWriter(tiMap);
              for (Map.Entry<String,Integer> e : termToIndex.entrySet())
                  pw.println(e.getKey() + "\t" + e.getValue());
              pw.close();
              LOGGER.info("wrote term-index map to " + tiMap);
          } catch (Throwable t) {
              t.printStackTrace();
          }
  
          // Calculate the affinity matrix for the cooccurrence matrix
          MatrixFile affinityMatrix = affinityCreator.calculate(
                  cooccurrenceMatrix);
          
          // Using the affinity matrix as a guide to locality, project the
          // co-occurrence matrix into the lower dimensional subspace
          reduced = LocalityPreservingProjection.project(
              cooccurrenceMatrix, affinityMatrix, dimensions);
      }
docs: {@inheritDoc}