Class 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 java.util.List<java.util.List<org.languagetool.rules.patterns.PatternToken>> ANTI_PATTERNS  
      private static morfologik.stemming.Dictionary dict  
      private org.languagetool.Language lang  
      private org.languagetool.LinguServices linguServices  
      private morfologik.speller.Speller speller  
      • Fields inherited from class org.languagetool.rules.Rule

        messages
    • Constructor Summary

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

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRule> getAntiPatterns()  
      java.lang.String getDescription()  
      private static @NotNull morfologik.stemming.Dictionary getDictionary()  
      java.lang.String getId()  
      private java.lang.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 isMisspelled​(java.lang.String word)  
      private boolean isPunctuation​(java.lang.String word)  
      private boolean isRelevant​(org.languagetool.AnalyzedTokenReadings token)  
      org.languagetool.rules.RuleMatch[] match​(org.languagetool.AnalyzedSentence sentence)  
      private static org.languagetool.rules.patterns.PatternToken token​(java.lang.String s)  
      • 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 Detail

      • 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 java.util.List<java.util.List<org.languagetool.rules.patterns.PatternToken>> ANTI_PATTERNS
    • Constructor Detail

      • CompoundInfinitivRule

        public CompoundInfinitivRule​(java.util.ResourceBundle messages,
                                     org.languagetool.Language lang,
                                     org.languagetool.UserConfig userConfig)
                              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • token

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

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

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

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

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

        private boolean isMisspelled​(java.lang.String word)
      • isRelevant

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

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

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

        public java.util.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 java.io.IOException
        Specified by:
        match in class org.languagetool.rules.Rule
        Throws:
        java.io.IOException
      • isPunctuation

        private boolean isPunctuation​(java.lang.String word)