code: public VectorSet map(ExampleSet data, FeatureIndex[] index)
              throws IllegalArgumentException {
          // logger.debug("AbstractMapping.map");
  
          boolean b = (data instanceof SentenceSetCopy);
          if (!b) {
              throw new IllegalArgumentException();
          }
  
          VectorSet result = new VectorSet();
  
          //
          for (int i = 0; i < data.size(); i++) {
              Object x = data.x(i);
              Object y = data.y(i);
              Object id = data.id(i);
  
              //
              Vector[] subspaces = map(x, id, index);
  
              // merge subspaces
              Vector space = mergeSubspaces(subspaces);
  
              // normalize feature space
              // space.normalize();
  
              // add space
              result.add(space, y, id);
          }
          return result;
      }
docs: /*
  protected int maxDimension(SparseVector[] subspaces) { int max = 0; for
  (int i=0;i<subspaces.length;i++) { if (subspaces[i].size() > max) max =
  subspaces[i].size(); } // end for i
  
  return max; } // end maxDimension