Package org.languagetool.tagging
Class ManualTagger
java.lang.Object
org.languagetool.tagging.ManualTagger
- All Implemented Interfaces:
WordTagger
A tagger that reads the POS information from a plain (UTF-8) text file. This
makes it possible for the user to edit the text file to let the system know
about new words or missing readings in the *.dict file.
File Format: fullform baseform postags (tab separated)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Map
<String, List<TaggedWord>> loadMapping
(InputStream inputStream, String encoding) Look up a word's baseform (lemma) and POS information.
-
Field Details
-
mapping
-
-
Constructor Details
-
ManualTagger
- Throws:
IOException
-
-
Method Details
-
loadMapping
private Map<String,List<TaggedWord>> loadMapping(InputStream inputStream, String encoding) throws IOException - Throws:
IOException
-
tag
Look up a word's baseform (lemma) and POS information.- Specified by:
tag
in interfaceWordTagger
- Parameters:
word
- the word to be tagged- Returns:
- the possible POS tags, or an empty list
-