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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTagDictionary(File dictionary) Initializes aTagDictionaryfrom adictionary file.voidsetTagDictionary(TagDictionary dictionary) Methods inherited from class opennlp.tools.postag.POSTaggerFactory
create, createFeatureGenerators, getPOSContextGenerator, getPOSContextGenerator, getSequenceValidator, validateArtifactMapMethods inherited from class opennlp.tools.util.BaseToolFactory
create, create, createManifestEntries
-
Constructor Details
-
MorfologikPOSTaggerFactory
public MorfologikPOSTaggerFactory()
-
-
Method Details
-
createTagDictionary
Initializes aTagDictionaryfrom adictionary file.- Overrides:
createTagDictionaryin classPOSTaggerFactory- Parameters:
dictionary- TheFileused as input for creating the dictionary.- Returns:
- A valid
TagDictionaryready for use. - Throws:
FileNotFoundException- Thrown ifdictionaryor related metadata could not be read in.IOException- Thrown if IO errors occurred.
-
getTagDictionary
- Overrides:
getTagDictionaryin classPOSTaggerFactory- Returns:
- The
TagDictionaryused. - Throws:
RuntimeException- Thrown if errors occurred loading or reading Morfologik dictionary files.
-
setTagDictionary
- Overrides:
setTagDictionaryin classPOSTaggerFactory
-
createEmptyTagDictionary
- Overrides:
createEmptyTagDictionaryin classPOSTaggerFactory
-
createTagDictionary
- Overrides:
createTagDictionaryin classPOSTaggerFactory- Throws:
IOException
-
createArtifactSerializersMap
- Overrides:
createArtifactSerializersMapin classPOSTaggerFactory
-
createArtifactMap
- Overrides:
createArtifactMapin classPOSTaggerFactory
-