public class POSTaggerFactory extends BaseToolFactory
| Modifier and Type | Field and Description |
|---|---|
protected Dictionary |
ngramDictionary |
protected TagDictionary |
posDictionary |
artifactProvider| Constructor and Description |
|---|
POSTaggerFactory()
Creates a
POSTaggerFactory that provides the default implementation
of the resources. |
POSTaggerFactory(Dictionary ngramDictionary,
TagDictionary posDictionary)
Creates a
POSTaggerFactory. |
create, create, createManifestEntries, initprotected Dictionary ngramDictionary
protected TagDictionary posDictionary
public POSTaggerFactory()
POSTaggerFactory that provides the default implementation
of the resources.public POSTaggerFactory(Dictionary ngramDictionary, TagDictionary posDictionary)
POSTaggerFactory. Use this constructor to
programmatically create a factory.ngramDictionary - posDictionary - protected void init(Dictionary ngramDictionary, TagDictionary posDictionary)
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 InvalidFormatException, FileNotFoundException, IOException
public TagDictionary createTagDictionary(InputStream in) throws InvalidFormatException, IOException
InvalidFormatExceptionIOExceptionpublic void setTagDictionary(TagDictionary dictionary)
public TagDictionary getTagDictionary()
public Dictionary getDictionary()
public void setDictionary(Dictionary ngramDict)
public POSContextGenerator getPOSContextGenerator()
public POSContextGenerator getPOSContextGenerator(int cacheSize)
public SequenceValidator<String> getSequenceValidator()
protected void validatePOSDictionary(POSDictionary posDict, AbstractModel posModel) throws InvalidFormatException
InvalidFormatExceptionpublic void validateArtifactMap()
throws InvalidFormatException
BaseToolFactoryInvalidFormatException.
Note:
Subclasses should generally invoke super.validateArtifactMap at the beginning
of this method.validateArtifactMap in class BaseToolFactoryInvalidFormatExceptionpublic static POSTaggerFactory create(String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException
InvalidFormatExceptionpublic TagDictionary createEmptyTagDictionary()
Copyright © 2016 The Apache Software Foundation. All rights reserved.