public class POSTaggerFactory extends BaseToolFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
POSTaggerFactory.POSDictionarySerializer |
| Constructor and Description |
|---|
POSTaggerFactory()
Creates a
POSTaggerFactory that provides the default implementation
of the resources. |
POSTaggerFactory(byte[] featureGeneratorBytes,
Map<String,Object> resources,
TagDictionary posDictionary) |
POSTaggerFactory(Dictionary ngramDictionary,
TagDictionary posDictionary)
Deprecated.
this constructor is here for backward compatibility and
is not functional anymore in the training of 1.8.x series models
|
create, create, createManifestEntriespublic POSTaggerFactory()
POSTaggerFactory that provides the default implementation
of the resources.@Deprecated public POSTaggerFactory(Dictionary ngramDictionary, TagDictionary posDictionary)
POSTaggerFactory. Use this constructor to
programmatically create a factory.ngramDictionary - posDictionary - public POSTaggerFactory(byte[] featureGeneratorBytes,
Map<String,Object> resources,
TagDictionary posDictionary)
public AdaptiveFeatureGenerator createFeatureGenerators()
AdaptiveFeatureGenerator. Usually this
is a set of generators contained in the AggregatedFeatureGenerator.
Note:
The generators are created on every call to this method.public Map<String,ArtifactSerializer> createArtifactSerializersMap()
BaseToolFactoryMap with pairs of keys and ArtifactSerializer.
The models implementation should call this method from
BaseModel#createArtifactSerializersMap
The base implementation will return a HashMap that should be
populated by sub-classes.
createArtifactSerializersMap in class BaseToolFactorypublic Map<String,Object> createArtifactMap()
BaseToolFactoryMap with pairs of keys and objects. The models
implementation should call this constructor that creates a model
programmatically.
The base implementation will return a HashMap that should be
populated by sub-classes.
createArtifactMap in class BaseToolFactorypublic TagDictionary createTagDictionary(File dictionary) throws IOException
IOExceptionpublic TagDictionary createTagDictionary(InputStream in) throws IOException
IOExceptionpublic void setTagDictionary(TagDictionary dictionary)
public TagDictionary getTagDictionary()
@Deprecated public Dictionary getDictionary()
@Deprecated public void setDictionary(Dictionary ngramDict)
public POSContextGenerator getPOSContextGenerator()
public POSContextGenerator getPOSContextGenerator(int cacheSize)
public SequenceValidator<String> getSequenceValidator()
public void validateArtifactMap()
throws InvalidFormatException
BaseToolFactoryInvalidFormatException.
Note:
Subclasses should generally invoke super.validateArtifactMap at the beginning
of this method.validateArtifactMap in class BaseToolFactoryInvalidFormatException@Deprecated public static POSTaggerFactory create(String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException
InvalidFormatExceptionpublic static POSTaggerFactory create(String subclassName, byte[] featureGeneratorBytes, Map<String,Object> resources, TagDictionary posDictionary) throws InvalidFormatException
InvalidFormatExceptionpublic TagDictionary createEmptyTagDictionary()
Copyright © 2017 The Apache Software Foundation. All rights reserved.