code: public DocumentFeatureGenerator createFeatureGenerators() {
  
      if (this.featureGeneratorBytes == null && this.artifactProvider != null) {
        this.featureGeneratorBytes = (byte[]) this.artifactProvider
            .getArtifact(DocumentClassifierModel.GENERATOR_DESCRIPTOR_ENTRY_NAME);
      }
      if (this.featureGeneratorBytes == null) {
        System.err.println(
            "WARNING: loading the default feature generator descriptor!!");
        this.featureGeneratorBytes = loadDefaultFeatureGeneratorBytes();
      }
  
      final InputStream descriptorIn = new ByteArrayInputStream(
          this.featureGeneratorBytes);
      DocumentFeatureGenerator generator = null;
      try {
        generator = DocumentGeneratorFactory.create(descriptorIn,
            new FeatureGeneratorResourceProvider() {
  
              @Override
              public Object getResource(final String key) {
                if (DocumentClassifierFactory.this.artifactProvider != null) {
                  return DocumentClassifierFactory.this.artifactProvider
                      .getArtifact(key);
                } else {
                  return DocumentClassifierFactory.this.resources.get(key);
                }
              }
            });
      } catch (final InvalidFormatException e) {
        // It is assumed that the creation of the feature generation does not
        // fail after it succeeded once during model loading.
  
        // But it might still be possible that such an exception is thrown,
        // in this case the caller should not be forced to handle the exception
        // and a Runtime Exception is thrown instead.
  
        // If the re-creation of the feature generation fails it is assumed
        // that this can only be caused by a programming mistake and therefore
        // throwing a Runtime Exception is reasonable
  
        throw new DocumentClassifierModel.FeatureGeneratorCreationError(e);
      } catch (final IOException e) {
        throw new IllegalStateException(
            "Reading from mem cannot result in an I/O error", e);
      }
      return generator;
    }
docs: Creates the {@link DocumentFeatureGenerator}. Usually this is a set of
  generators contained in the {@link DocumentFeatureAggregator}.
  
  Note: The generators are created on every call to this method.
  
  @return the feature generator or null if there is no descriptor in the
  model