Class ChunkerFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.chunker.ChunkerFactory
- Direct Known Subclasses:
ParserChunkerFactory
-
Constructor Summary
ConstructorsConstructorDescriptionCreates aChunkerFactorythat provides the default implementation of the resources. -
Method Summary
Modifier and TypeMethodDescriptionstatic ChunkerFactoryInstantiates aChunkerFactoryvia a givensubclassName.opennlp.tools.chunker.ChunkerContextGeneratoropennlp.tools.util.SequenceValidator<opennlp.tools.util.TokenTag> voidValidates the parsed artifacts.Methods inherited from class BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
Constructor Details
-
ChunkerFactory
public ChunkerFactory()Creates aChunkerFactorythat provides the default implementation of the resources.
-
-
Method Details
-
create
public static ChunkerFactory create(String subclassName) throws opennlp.tools.util.InvalidFormatException Instantiates aChunkerFactoryvia a givensubclassName.- Parameters:
subclassName- The class name used for instantiation. Ifnull, an instance ofChunkerFactorywill be returned per default. Otherwise, theExtensionLoadermechanism is applied to load the requestedsubclassName.- Returns:
- A valid
ChunkerFactoryinstance. - Throws:
opennlp.tools.util.InvalidFormatException- Thrown if theExtensionLoadermechanism failed to create the factory associated withsubclassName.
-
validateArtifactMap
public void validateArtifactMap() throws opennlp.tools.util.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:
opennlp.tools.util.InvalidFormatException- Thrown if validation found invalid states.
-
getSequenceValidator
public opennlp.tools.util.SequenceValidator<opennlp.tools.util.TokenTag> getSequenceValidator() -
getContextGenerator
public opennlp.tools.chunker.ChunkerContextGenerator getContextGenerator()
-