Class GermanTagger

java.lang.Object
org.languagetool.tagging.BaseTagger
org.languagetool.tagging.de.GermanTagger
All Implemented Interfaces:
org.languagetool.tagging.Tagger
Direct Known Subclasses:
SwissGermanTagger

public class GermanTagger extends org.languagetool.tagging.BaseTagger
German part-of-speech tagger, requires data file in de/german.dict in the classpath. The POS tagset is described in tagset.txt
  • Field Details

    • removalTagger

      private final org.languagetool.tagging.ManualTagger removalTagger
    • compoundTokenizer

      private GermanCompoundTokenizer compoundTokenizer
  • Constructor Details

    • GermanTagger

      public GermanTagger()
  • Method Details

    • addStem

      private List<org.languagetool.tagging.TaggedWord> addStem(List<org.languagetool.tagging.TaggedWord> analyzedWordResults, String stem)
    • sanitizeWord

      private String sanitizeWord(String word)
    • getManualAdditionsFileName

      public String getManualAdditionsFileName()
      Specified by:
      getManualAdditionsFileName in class org.languagetool.tagging.BaseTagger
    • getManualRemovalsFileName

      public String getManualRemovalsFileName()
      Overrides:
      getManualRemovalsFileName in class org.languagetool.tagging.BaseTagger
    • lookup

      @Nullable public @Nullable org.languagetool.AnalyzedTokenReadings lookup(String word) throws IOException
      Return only the first reading of the given word or null.
      Throws:
      IOException
    • tag

      public List<org.languagetool.tagging.TaggedWord> tag(String word)
    • matchesUppercaseAdjective

      private boolean matchesUppercaseAdjective(String unknownUppercaseToken)
    • tag

      public List<org.languagetool.AnalyzedTokenReadings> tag(List<String> sentenceTokens) throws IOException
      Specified by:
      tag in interface org.languagetool.tagging.Tagger
      Overrides:
      tag in class org.languagetool.tagging.BaseTagger
      Throws:
      IOException
    • tag

      public List<org.languagetool.AnalyzedTokenReadings> tag(List<String> sentenceTokens, boolean ignoreCase) throws IOException
      Throws:
      IOException
    • getImperativeForm

      private List<org.languagetool.AnalyzedToken> getImperativeForm(String word, List<String> sentenceTokens, int pos)
    • getSubstantivatedForms

      private List<org.languagetool.AnalyzedToken> getSubstantivatedForms(String word, List<String> sentenceTokens, int pos)
    • initializeIfRequired

      private void initializeIfRequired() throws IOException
      Throws:
      IOException
    • getNoInfoToken

      private org.languagetool.AnalyzedToken getNoInfoToken(String word)
    • getAnalyzedTokens

      private List<org.languagetool.AnalyzedToken> getAnalyzedTokens(List<org.languagetool.tagging.TaggedWord> taggedWords, String word)
    • getAnalyzedTokens

      private List<org.languagetool.AnalyzedToken> getAnalyzedTokens(List<org.languagetool.tagging.TaggedWord> taggedWords, String word, List<String> compoundParts)