Package org.languagetool.tagging
Class CombiningTagger
java.lang.Object
org.languagetool.tagging.CombiningTagger
- All Implemented Interfaces:
WordTagger
Tags a word using two taggers, combining their results.
- Since:
- 2.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final WordTaggerprivate final WordTaggerprivate final WordTagger -
Constructor Summary
ConstructorsConstructorDescriptionCombiningTagger(WordTagger tagger1, WordTagger tagger2, boolean overwriteWithSecondTagger) CombiningTagger(WordTagger tagger1, WordTagger tagger2, WordTagger removalTagger, boolean overwriteWithSecondTagger) -
Method Summary
-
Field Details
-
tagger1
-
tagger2
-
removalTagger
-
overwriteWithSecondTagger
private final boolean overwriteWithSecondTagger
-
-
Constructor Details
-
CombiningTagger
-
CombiningTagger
public CombiningTagger(WordTagger tagger1, WordTagger tagger2, WordTagger removalTagger, boolean overwriteWithSecondTagger) - Parameters:
tagger1- typically the tagger that takes its data from the binary filetagger2- typically the tagger that takes its data from the plain text fileadded.txtremovalTagger- the tagger that removes readings which takes its data from the plain text fileremoved.txt, ornulloverwriteWithSecondTagger- if set totrue, only the second tagger's result will be used if both first and second tagger can tag that word- Since:
- 3.2
-
-
Method Details
-
tag
- Specified by:
tagin interfaceWordTagger- Parameters:
word- the word to be tagged- Returns:
- the possible POS tags, or an empty list
-