public static DocumentFeatureGenerator create(InputStream xmlDescriptorIn,
      FeatureGeneratorResourceProvider resourceManager) throws IOException {

    org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn);

    Element generatorElement = xmlDescriptorDOM.getDocumentElement();

    return createGenerator(generatorElement, resourceManager);
  }
public static DocumentFeatureGenerator create ( InputStream xmlDescriptorIn , FeatureGeneratorResourceProvider resourceManager ) throws IOException { org . w3c . dom . Document xmlDescriptorDOM = createDOM ( xmlDescriptorIn ) ; Element generatorElement = xmlDescriptorDOM . getDocumentElement ( ) ; return createGenerator ( generatorElement , resourceManager ) ; }
Creates an {@link DocumentFeatureGenerator} from an provided XML descriptor.

Usually this XML descriptor contains a set of nested feature generators
which are then used to generate the features by one of the opennlp
components.

@param xmlDescriptorIn the {@link InputStream} from which the descriptor
is read, the stream remains open and must be closed by the caller.

@param resourceManager the resource manager which is used to resolve resources
referenced by a key in the descriptor

@return created feature generators

@throws IOException if an error occurs during reading from the descriptor
{@link InputStream}