Class CompoundInfinitivRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.de.CompoundInfinitivRule

public class CompoundInfinitivRule extends org.languagetool.rules.Rule
Checks the compound spelling of infinitive clause (Erweiterter Infinitiv mit zu)
Since:
4.4
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final List<List<org.languagetool.rules.patterns.PatternToken>>
     
    private static morfologik.stemming.Dictionary
     
    private final org.languagetool.Language
     
    private final org.languagetool.LinguServices
     
    private morfologik.speller.Speller
     

    Fields inherited from class org.languagetool.rules.Rule

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompoundInfinitivRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRule>
     
     
    private static @NotNull morfologik.stemming.Dictionary
     
     
    private String
    getLemma(org.languagetool.AnalyzedTokenReadings token)
     
    private boolean
    isException(org.languagetool.AnalyzedTokenReadings[] tokens, int n)
     
    private static boolean
    isInfinitiv(org.languagetool.AnalyzedTokenReadings token)
     
    private boolean
     
    private boolean
     
    private boolean
    isRelevant(org.languagetool.AnalyzedTokenReadings token)
     
    org.languagetool.rules.RuleMatch[]
    match(org.languagetool.AnalyzedSentence sentence)
     
    private static org.languagetool.rules.patterns.PatternToken
     

    Methods inherited from class org.languagetool.rules.Rule

    addExamplePair, estimateContextForSureMatch, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • dict

      private static morfologik.stemming.Dictionary dict
    • linguServices

      private final org.languagetool.LinguServices linguServices
    • speller

      private morfologik.speller.Speller speller
    • lang

      private final org.languagetool.Language lang
    • ANTI_PATTERNS

      private static final List<List<org.languagetool.rules.patterns.PatternToken>> ANTI_PATTERNS
  • Constructor Details

    • CompoundInfinitivRule

      public CompoundInfinitivRule(ResourceBundle messages, org.languagetool.Language lang, org.languagetool.UserConfig userConfig) throws IOException
      Throws:
      IOException
  • Method Details

    • token

      private static org.languagetool.rules.patterns.PatternToken token(String s)
    • getDictionary

      @NotNull private static @NotNull morfologik.stemming.Dictionary getDictionary() throws IOException
      Throws:
      IOException
    • getId

      public String getId()
      Specified by:
      getId in class org.languagetool.rules.Rule
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in class org.languagetool.rules.Rule
    • isInfinitiv

      private static boolean isInfinitiv(org.languagetool.AnalyzedTokenReadings token)
    • isMisspelled

      private boolean isMisspelled(String word)
    • isRelevant

      private boolean isRelevant(org.languagetool.AnalyzedTokenReadings token)
    • getLemma

      private String getLemma(org.languagetool.AnalyzedTokenReadings token)
    • isException

      private boolean isException(org.languagetool.AnalyzedTokenReadings[] tokens, int n)
    • getAntiPatterns

      public List<org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRule> getAntiPatterns()
      Overrides:
      getAntiPatterns in class org.languagetool.rules.Rule
    • match

      public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence) throws IOException
      Specified by:
      match in class org.languagetool.rules.Rule
      Throws:
      IOException
    • isPunctuation

      private boolean isPunctuation(String word)