|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object opennlp.tools.util.BaseToolFactory opennlp.tools.postag.POSTaggerFactory
public class POSTaggerFactory
The factory that provides POS Tagger default implementations and resources
Constructor Summary | |
---|---|
POSTaggerFactory()
Creates a POSTaggerFactory that provides the default implementation
of the resources. |
|
POSTaggerFactory(Dictionary ngramDictionary,
TagDictionary posDictionary)
Creates a POSTaggerFactory . |
Method Summary | |
---|---|
static POSTaggerFactory |
create(String subclassName,
Dictionary ngramDictionary,
TagDictionary posDictionary)
|
Map<String,Object> |
createArtifactMap()
Creates a Map with pairs of keys and objects. |
Map<String,ArtifactSerializer> |
createArtifactSerializersMap()
Creates a Map with pairs of keys and ArtifactSerializer . |
TagDictionary |
createEmptyTagDictionary()
|
TagDictionary |
createTagDictionary(File dictionary)
|
TagDictionary |
createTagDictionary(InputStream in)
|
Dictionary |
getDictionary()
|
POSContextGenerator |
getPOSContextGenerator()
|
POSContextGenerator |
getPOSContextGenerator(int cacheSize)
|
SequenceValidator<String> |
getSequenceValidator()
|
TagDictionary |
getTagDictionary()
|
void |
setDictionary(Dictionary ngramDict)
|
void |
setTagDictionary(TagDictionary dictionary)
|
void |
validateArtifactMap()
Validates the parsed artifacts. |
Methods inherited from class opennlp.tools.util.BaseToolFactory |
---|
create, create, createManifestEntries |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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
- Method Detail |
---|
public Map<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 Map<String,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(File dictionary) throws InvalidFormatException, FileNotFoundException, IOException
InvalidFormatException
FileNotFoundException
IOException
public TagDictionary createTagDictionary(InputStream in) throws InvalidFormatException, IOException
InvalidFormatException
IOException
public 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()
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
public static POSTaggerFactory create(String subclassName, Dictionary ngramDictionary, TagDictionary posDictionary) throws InvalidFormatException
InvalidFormatException
public TagDictionary createEmptyTagDictionary()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |