Package opennlp.tools.doccat
Class DoccatFactory
- java.lang.Object
-
- opennlp.tools.util.BaseToolFactory
-
- opennlp.tools.doccat.DoccatFactory
-
public class DoccatFactory extends BaseToolFactory
The factory that provides Doccat default implementations and resources.
-
-
Constructor Summary
Constructors Constructor Description DoccatFactory()Instantiates aDoccatFactorythat provides the default implementation of the resources.DoccatFactory(FeatureGenerator[] featureGenerators)Instantiates aDoccatFactorythat provides the default implementation of the resources.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DoccatFactorycreate(String subclassName, FeatureGenerator[] featureGenerators)Factory method the framework uses create a newDoccatFactory.Map<String,String>createManifestEntries()FeatureGenerator[]getFeatureGenerators()voidsetFeatureGenerators(FeatureGenerator[] featureGenerators)voidvalidateArtifactMap()Validates the parsed artifacts.-
Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap
-
-
-
-
Constructor Detail
-
DoccatFactory
public DoccatFactory()
Instantiates aDoccatFactorythat provides the default implementation of the resources.
-
DoccatFactory
public DoccatFactory(FeatureGenerator[] featureGenerators)
Instantiates aDoccatFactorythat provides the default implementation of the resources.- Parameters:
featureGenerators- ThefeatureGeneratorsto use.
-
-
Method Detail
-
createManifestEntries
public Map<String,String> createManifestEntries()
- Overrides:
createManifestEntriesin classBaseToolFactory- Returns:
- Retrieves the manifest entries to be added to the model manifest.
-
validateArtifactMap
public void validateArtifactMap() throws InvalidFormatExceptionDescription 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.
-
getFeatureGenerators
public FeatureGenerator[] getFeatureGenerators()
- Returns:
- Retrieves the
generatorsused.
-
setFeatureGenerators
public void setFeatureGenerators(FeatureGenerator[] featureGenerators)
- Parameters:
featureGenerators- ThefeatureGeneratorsto use.
-
-