Class AbstractDisambiguator
- java.lang.Object
-
- org.languagetool.tagging.disambiguation.AbstractDisambiguator
-
- All Implemented Interfaces:
Disambiguator
- Direct Known Subclasses:
DemoDisambiguator,MultiWordChunker,MultiWordChunker2,NoopDisambiguator,XmlRuleDisambiguator
public abstract class AbstractDisambiguator extends java.lang.Object implements Disambiguator
Abstract Disambiguator class to provide default (empty) implementation forDisambiguator.preDisambiguate(AnalyzedSentence).- Since:
- 3.7
-
-
Constructor Summary
Constructors Constructor Description AbstractDisambiguator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyzedSentencepreDisambiguate(AnalyzedSentence input)If possible, filters out the wrong POS tags.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.languagetool.tagging.disambiguation.Disambiguator
disambiguate
-
-
-
-
Method Detail
-
preDisambiguate
public AnalyzedSentence preDisambiguate(AnalyzedSentence input)
Description copied from interface:DisambiguatorIf possible, filters out the wrong POS tags. This code will run before disambiguation rules from xml are called. This allows to have some initial disambiguation logic in Java.- Specified by:
preDisambiguatein interfaceDisambiguator- Parameters:
input- The sentence with already tagged words. The words are expected to have multiple tags.- Returns:
- Analyzed sentence, where each word has only one (possibly the most correct) tag.
-
-