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,
java.util.Map<java.lang.String,java.lang.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
|
Modifier and Type | Method and Description |
---|---|
static POSTaggerFactory |
create(java.lang.String subclassName,
byte[] featureGeneratorBytes,
java.util.Map<java.lang.String,java.lang.Object> resources,
TagDictionary posDictionary) |
static POSTaggerFactory |
create(java.lang.String subclassName,
Dictionary ngramDictionary,
TagDictionary posDictionary)
Deprecated.
|
java.util.Map<java.lang.String,java.lang.Object> |
createArtifactMap()
Creates a
Map with pairs of keys and objects. |
java.util.Map<java.lang.String,ArtifactSerializer> |
createArtifactSerializersMap()
Creates a
Map with pairs of keys and ArtifactSerializer . |
TagDictionary |
createEmptyTagDictionary() |
AdaptiveFeatureGenerator |
createFeatureGenerators()
Creates the
AdaptiveFeatureGenerator . |
TagDictionary |
createTagDictionary(java.io.File dictionary) |
TagDictionary |
createTagDictionary(java.io.InputStream in) |
Dictionary |
getDictionary()
Deprecated.
this will be reduced in visibility and later removed
|
POSContextGenerator |
getPOSContextGenerator() |
POSContextGenerator |
getPOSContextGenerator(int cacheSize) |
SequenceValidator<java.lang.String> |
getSequenceValidator() |
TagDictionary |
getTagDictionary() |
void |
setDictionary(Dictionary ngramDict)
Deprecated.
|
void |
setTagDictionary(TagDictionary dictionary) |
void |
validateArtifactMap()
Validates the parsed artifacts.
|
create, create, createManifestEntries
public 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, java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String,ArtifactSerializer> createArtifactSerializersMap()
BaseToolFactory
Map
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 BaseToolFactory
public java.util.Map<java.lang.String,java.lang.Object> createArtifactMap()
BaseToolFactory
Map
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 BaseToolFactory
public TagDictionary createTagDictionary(java.io.File dictionary) throws java.io.IOException
java.io.IOException
public TagDictionary createTagDictionary(java.io.InputStream in) throws java.io.IOException
java.io.IOException
public 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<java.lang.String> getSequenceValidator()
public void validateArtifactMap() throws InvalidFormatException
BaseToolFactory
InvalidFormatException
.
Note:
Subclasses should generally invoke super.validateArtifactMap at the beginning
of this method.validateArtifactMap
in class BaseToolFactory
InvalidFormatException
@Deprecated public static POSTaggerFactory create(java.lang.String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException
InvalidFormatException
public static POSTaggerFactory create(java.lang.String subclassName, byte[] featureGeneratorBytes, java.util.Map<java.lang.String,java.lang.Object> resources, TagDictionary posDictionary) throws InvalidFormatException
InvalidFormatException
public TagDictionary createEmptyTagDictionary()
Copyright © 2010 - 2023 Adobe. All Rights Reserved