Package opennlp.tools.namefind
Class TokenNameFinderFactory
- java.lang.Object
-
- opennlp.tools.util.BaseToolFactory
-
- opennlp.tools.namefind.TokenNameFinderFactory
-
public class TokenNameFinderFactory extends BaseToolFactory
-
-
Constructor Summary
Constructors Constructor Description TokenNameFinderFactory()
Creates aTokenNameFinderFactory
that provides the default implementation of the resources.TokenNameFinderFactory(byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, SequenceCodec<java.lang.String> seqCodec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TokenNameFinderFactory
create(java.lang.String subclassName, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, SequenceCodec<java.lang.String> seqCodec)
NameContextGenerator
createContextGenerator()
AdaptiveFeatureGenerator
createFeatureGenerators()
Creates theAdaptiveFeatureGenerator
.SequenceCodec<java.lang.String>
createSequenceCodec()
static SequenceCodec<java.lang.String>
instantiateSequenceCodec(java.lang.String sequenceCodecImplName)
void
validateArtifactMap()
Validates the parsed artifacts.-
Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createArtifactMap, createArtifactSerializersMap, createManifestEntries
-
-
-
-
Constructor Detail
-
TokenNameFinderFactory
public TokenNameFinderFactory()
Creates aTokenNameFinderFactory
that provides the default implementation of the resources.
-
TokenNameFinderFactory
public TokenNameFinderFactory(byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, SequenceCodec<java.lang.String> seqCodec)
-
-
Method Detail
-
create
public static TokenNameFinderFactory create(java.lang.String subclassName, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, SequenceCodec<java.lang.String> seqCodec) throws InvalidFormatException
- Throws:
InvalidFormatException
-
validateArtifactMap
public void validateArtifactMap() throws InvalidFormatException
Description copied from class:BaseToolFactory
Validates 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:
validateArtifactMap
in classBaseToolFactory
- Throws:
InvalidFormatException
-
createSequenceCodec
public SequenceCodec<java.lang.String> createSequenceCodec()
-
createContextGenerator
public NameContextGenerator createContextGenerator()
-
createFeatureGenerators
public AdaptiveFeatureGenerator 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
public static SequenceCodec<java.lang.String> instantiateSequenceCodec(java.lang.String sequenceCodecImplName)
-
-