Package opennlp.tools.namefind
Class TokenNameFinderFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.namefind.TokenNameFinderFactory
-
Constructor Summary
ConstructorsConstructorDescriptionCreates aTokenNameFinderFactorythat provides the default implementation of the resources.TokenNameFinderFactory(byte[] featureGeneratorBytes, Map<String, Object> resources, SequenceCodec<String> seqCodec) -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenNameFinderFactorycreate(String subclassName, byte[] featureGeneratorBytes, Map<String, Object> resources, SequenceCodec<String> seqCodec) Creates theAdaptiveFeatureGenerator.static SequenceCodec<String> instantiateSequenceCodec(String sequenceCodecImplName) voidValidates the parsed artifacts.Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
Constructor Details
-
TokenNameFinderFactory
public TokenNameFinderFactory()Creates aTokenNameFinderFactorythat provides the default implementation of the resources. -
TokenNameFinderFactory
public TokenNameFinderFactory(byte[] featureGeneratorBytes, Map<String, Object> resources, SequenceCodec<String> seqCodec)
-
-
Method Details
-
create
public static TokenNameFinderFactory create(String subclassName, byte[] featureGeneratorBytes, Map<String, Object> resources, SequenceCodec<String> seqCodec) throws InvalidFormatException- Throws:
InvalidFormatException
-
validateArtifactMap
Description copied from class:BaseToolFactoryValidates the parsed artifacts. If something is not valid subclasses should throw anInvalidFormatException. Note: Subclasses should generally invoke super.validateArtifactMap at the beginning of this method.- Specified by:
validateArtifactMapin classBaseToolFactory- Throws:
InvalidFormatException
-
createSequenceCodec
-
createContextGenerator
-
createFeatureGenerators
Creates theAdaptiveFeatureGenerator. Usually this is a set of generators contained in theAggregatedFeatureGenerator. Note: The generators are created on every call to this method.- Returns:
- the feature generator or null if there is no descriptor in the model
-
instantiateSequenceCodec
-