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 Object implements Disambiguator
Abstract Disambiguator class to provide default (empty) implementation for Disambiguator.preDisambiguate(AnalyzedSentence).
Since:
3.7
  • Constructor Details

    • AbstractDisambiguator

      public AbstractDisambiguator()
  • Method Details

    • preDisambiguate

      public AnalyzedSentence preDisambiguate(AnalyzedSentence input)
      Description copied from interface: Disambiguator
      If 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:
      preDisambiguate in interface Disambiguator
      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.