Package opennlp.tools.lemmatizer
Class LemmatizerFactory
- java.lang.Object
-
- opennlp.tools.util.BaseToolFactory
-
- opennlp.tools.lemmatizer.LemmatizerFactory
-
public class LemmatizerFactory extends BaseToolFactory
The factory that providesLemmatizerdefault implementation and resources.
-
-
Constructor Summary
Constructors Constructor Description LemmatizerFactory()Instantiates aLemmatizerFactorythat provides the default implementation of the resources.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LemmatizerFactorycreate(String subclassName)Instantiates aLemmatizerFactoryvia a givensubclassName.LemmatizerContextGeneratorgetContextGenerator()SequenceValidator<String>getSequenceValidator()voidvalidateArtifactMap()Validates the parsed artifacts.-
Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
-
-
-
Constructor Detail
-
LemmatizerFactory
public LemmatizerFactory()
Instantiates aLemmatizerFactorythat provides the default implementation of the resources.
-
-
Method Detail
-
create
public static LemmatizerFactory create(String subclassName) throws InvalidFormatException
Instantiates aLemmatizerFactoryvia a givensubclassName.- Parameters:
subclassName- The class name used for instantiation. Ifnull, an instance ofLemmatizerFactorywill be returned per default. Otherwise, theExtensionLoadermechanism is applied to load the requestedsubclassName.- Returns:
- A valid
LemmatizerFactoryinstance. - Throws:
InvalidFormatException
-
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.
-
getSequenceValidator
public SequenceValidator<String> getSequenceValidator()
- Returns:
- Retrieves a new
SequenceValidatorinstance.
-
getContextGenerator
public LemmatizerContextGenerator getContextGenerator()
- Returns:
- Retrieves a new
LemmatizerContextGeneratorinstance.
-
-