Class DoccatFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.doccat.DoccatFactory
The factory that provides Doccat default implementations and resources.
-
Field Summary
FieldsFields inherited from class BaseToolFactory
artifactProvider -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates aDoccatFactorythat provides the default implementation of the resources.DoccatFactory(FeatureGenerator[] featureGenerators) Instantiates aDoccatFactorythat provides the default implementation of the resources. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoccatFactorycreate(String subclassName, FeatureGenerator[] featureGenerators) Factory method the framework uses create a newDoccatFactory.private Stringprotected voidinit(FeatureGenerator[] featureGenerators) private FeatureGenerator[]loadFeatureGenerators(String classNames) voidsetFeatureGenerators(FeatureGenerator[] featureGenerators) voidValidates the parsed artifacts.Methods inherited from class BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, init
-
Field Details
-
FEATURE_GENERATORS
- See Also:
-
featureGenerators
-
-
Constructor Details
-
DoccatFactory
public DoccatFactory()Instantiates aDoccatFactorythat provides the default implementation of the resources. -
DoccatFactory
Instantiates aDoccatFactorythat provides the default implementation of the resources.- Parameters:
featureGenerators- ThefeatureGeneratorsto use.
-
-
Method Details
-
init
-
createManifestEntries
- Overrides:
createManifestEntriesin classBaseToolFactory- Returns:
- Retrieves the manifest entries to be added to the model manifest.
-
featureGeneratorsAsString
-
validateArtifactMap
Description copied from class:BaseToolFactoryValidates the parsed artifacts.Note: Subclasses should generally invoke
super.validateArtifactMapat the beginning of this method.- Specified by:
validateArtifactMapin classBaseToolFactory- Throws:
InvalidFormatException- Thrown if validation found invalid states.
-
create
public static DoccatFactory create(String subclassName, FeatureGenerator[] featureGenerators) throws InvalidFormatException Factory method the framework uses create a newDoccatFactory.- Parameters:
subclassName- The name of the class implementing theDoccatFactory.featureGenerators- ThefeatureGeneratorsto use.- Returns:
- A valid
DoccatFactoryinstance. - Throws:
InvalidFormatException- Thrown if theExtensionLoadermechanism failed to create the factory associated withsubclassName.
-
loadFeatureGenerators
-
getFeatureGenerators
- Returns:
- Retrieves the
generatorsused.
-
setFeatureGenerators
- Parameters:
featureGenerators- ThefeatureGeneratorsto use.
-