Package opennlp.morfologik.tagdict
Class MorfologikPOSTaggerFactory
java.lang.Object
opennlp.tools.util.BaseToolFactory
opennlp.tools.postag.POSTaggerFactory
opennlp.morfologik.tagdict.MorfologikPOSTaggerFactory
public class MorfologikPOSTaggerFactory
extends opennlp.tools.postag.POSTaggerFactory
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
opennlp.tools.postag.POSTaggerFactory.POSDictionarySerializer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionopennlp.tools.postag.TagDictionaryopennlp.tools.postag.TagDictionarycreateTagDictionary(File dictionary) Initializes aTagDictionaryfrom adictionary file.opennlp.tools.postag.TagDictionaryopennlp.tools.postag.TagDictionaryvoidsetTagDictionary(opennlp.tools.postag.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 classopennlp.tools.postag.POSTaggerFactory- 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
public opennlp.tools.postag.TagDictionary getTagDictionary()- Overrides:
getTagDictionaryin classopennlp.tools.postag.POSTaggerFactory- Returns:
- The
TagDictionaryused. - Throws:
RuntimeException- Thrown if errors occurred loading or reading Morfologik dictionary files.
-
setTagDictionary
public void setTagDictionary(opennlp.tools.postag.TagDictionary dictionary) - Overrides:
setTagDictionaryin classopennlp.tools.postag.POSTaggerFactory
-
createEmptyTagDictionary
public opennlp.tools.postag.TagDictionary createEmptyTagDictionary()- Overrides:
createEmptyTagDictionaryin classopennlp.tools.postag.POSTaggerFactory
-
createTagDictionary
- Overrides:
createTagDictionaryin classopennlp.tools.postag.POSTaggerFactory- Throws:
IOException
-
createArtifactSerializersMap
- Overrides:
createArtifactSerializersMapin classopennlp.tools.postag.POSTaggerFactory
-
createArtifactMap
- Overrides:
createArtifactMapin classopennlp.tools.postag.POSTaggerFactory
-