Package opennlp.morfologik.tagdict
Class MorfologikPOSTaggerFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.postag.POSTaggerFactory
opennlp.morfologik.tagdict.MorfologikPOSTaggerFactory
The factory provides a Morfologik specific
POSTaggerFactory
implementation
and initializes related resources.-
Nested Class Summary
Nested classes/interfaces inherited from class opennlp.tools.postag.POSTaggerFactory
POSTaggerFactory.POSDictionarySerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTagDictionary
(File dictionary) Initializes aTagDictionary
from adictionary file
.void
setTagDictionary
(TagDictionary dictionary) Methods inherited from class opennlp.tools.postag.POSTaggerFactory
create, createFeatureGenerators, getPOSContextGenerator, getPOSContextGenerator, getSequenceValidator, validateArtifactMap
Methods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createManifestEntries
-
Constructor Details
-
MorfologikPOSTaggerFactory
public MorfologikPOSTaggerFactory()
-
-
Method Details
-
createTagDictionary
Initializes aTagDictionary
from adictionary file
.- Overrides:
createTagDictionary
in classPOSTaggerFactory
- Parameters:
dictionary
- TheFile
used as input for creating the dictionary.- Returns:
- A valid
TagDictionary
ready for use. - Throws:
FileNotFoundException
- Thrown ifdictionary
or related metadata could not be read in.IOException
- Thrown if IO errors occurred.
-
getTagDictionary
- Overrides:
getTagDictionary
in classPOSTaggerFactory
- Returns:
- The
TagDictionary
used. - Throws:
RuntimeException
- Thrown if errors occurred loading or reading Morfologik dictionary files.
-
setTagDictionary
- Overrides:
setTagDictionary
in classPOSTaggerFactory
-
createEmptyTagDictionary
- Overrides:
createEmptyTagDictionary
in classPOSTaggerFactory
-
createTagDictionary
- Overrides:
createTagDictionary
in classPOSTaggerFactory
- Throws:
IOException
-
createArtifactSerializersMap
- Overrides:
createArtifactSerializersMap
in classPOSTaggerFactory
-
createArtifactMap
- Overrides:
createArtifactMap
in classPOSTaggerFactory
-