Package opennlp.tools.doccat
Class DoccatFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.doccat.DoccatFactory
The factory that provides Doccat default implementations and resources.
-
Constructor Summary
ConstructorDescriptionInstantiates aDoccatFactory
that provides the default implementation of the resources.DoccatFactory
(FeatureGenerator[] featureGenerators) Instantiates aDoccatFactory
that provides the default implementation of the resources. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoccatFactory
create
(String subclassName, FeatureGenerator[] featureGenerators) Factory method the framework uses create a newDoccatFactory
.void
setFeatureGenerators
(FeatureGenerator[] featureGenerators) void
Validates the parsed artifacts.Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap
-
Constructor Details
-
DoccatFactory
public DoccatFactory()Instantiates aDoccatFactory
that provides the default implementation of the resources. -
DoccatFactory
Instantiates aDoccatFactory
that provides the default implementation of the resources.- Parameters:
featureGenerators
- ThefeatureGenerators
to use.
-
-
Method Details
-
createManifestEntries
- Overrides:
createManifestEntries
in classBaseToolFactory
- Returns:
- Retrieves the manifest entries to be added to the model manifest.
-
validateArtifactMap
Description copied from class:BaseToolFactory
Validates the parsed artifacts.Note: Subclasses should generally invoke
super.validateArtifactMap
at the beginning of this method.- Specified by:
validateArtifactMap
in 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
- ThefeatureGenerators
to use.- Returns:
- A valid
DoccatFactory
instance. - Throws:
InvalidFormatException
- Thrown if theExtensionLoader
mechanism failed to create the factory associated withsubclassName
.
-
getFeatureGenerators
- Returns:
- Retrieves the
generators
used.
-
setFeatureGenerators
- Parameters:
featureGenerators
- ThefeatureGenerators
to use.
-