@Test public void testCreationWithTokenClassFeatureGenerator() throws Exception { InputStream generatorDescriptorIn = getClass().getResourceAsStream( "/opennlp/tools/util/featuregen/TestTokenClassFeatureGeneratorConfig.xml"); Assert.assertNotNull(generatorDescriptorIn); AggregatedFeatureGenerator aggregatedGenerator = (AggregatedFeatureGenerator) GeneratorFactory.create(generatorDescriptorIn, null); Assert.assertEquals(1, aggregatedGenerator.getGenerators().size()); Assert.assertEquals(TokenClassFeatureGenerator.class.getName(), aggregatedGenerator.getGenerators().iterator().next().getClass().getName()); }
public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn, FeatureGeneratorResourceProvider resourceManager) throws IOException { org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn); Element generatorElement = xmlDescriptorDOM.getDocumentElement(); return createGenerator(generatorElement, resourceManager); }
GeneratorFactory { public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn, FeatureGeneratorResourceProvider resourceManager) throws IOException { org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn); Element generatorElement = xmlDescriptorDOM.getDocumentElement(); return createGenerator(generatorElement, resourceManager); } }
GeneratorFactory { public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn, FeatureGeneratorResourceProvider resourceManager) throws IOException { org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn); Element generatorElement = xmlDescriptorDOM.getDocumentElement(); return createGenerator(generatorElement, resourceManager); }  }
GeneratorFactory { public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn, FeatureGeneratorResourceProvider resourceManager) throws IOException { org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn); Element generatorElement = xmlDescriptorDOM.getDocumentElement(); return createGenerator(generatorElement, resourceManager); }  static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn,
      FeatureGeneratorResourceProvider resourceManager); static Map<String, ArtifactSerializer<?>> extractArtifactSerializerMappings(
      InputStream xmlDescriptorIn); static List<Element> getDescriptorElements(InputStream xmlDescriptorIn); }
GeneratorFactory { public static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn, FeatureGeneratorResourceProvider resourceManager) throws IOException { org.w3c.dom.Document xmlDescriptorDOM = createDOM(xmlDescriptorIn); Element generatorElement = xmlDescriptorDOM.getDocumentElement(); return createGenerator(generatorElement, resourceManager); }  static AdaptiveFeatureGenerator create(InputStream xmlDescriptorIn,
      FeatureGeneratorResourceProvider resourceManager); static Map<String, ArtifactSerializer<?>> extractArtifactSerializerMappings(
      InputStream xmlDescriptorIn); static List<Element> getDescriptorElements(InputStream xmlDescriptorIn);  }