Class WordCoherencyRule


  • public class WordCoherencyRule
    extends org.languagetool.rules.AbstractWordCoherencyRule
    Persian version of AbstractWordCoherencyRule.
    Since:
    2.7
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> wordMap  
      • Fields inherited from class org.languagetool.rules.Rule

        messages
    • Constructor Summary

      Constructors 
      Constructor Description
      WordCoherencyRule​(java.util.ResourceBundle messages)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getId()  
      protected java.lang.String getMessage​(java.lang.String word1, java.lang.String word2)  
      protected java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> getWordMap()  
      • Methods inherited from class org.languagetool.rules.AbstractWordCoherencyRule

        match, minToCheckParagraph
      • Methods inherited from class org.languagetool.rules.TextLevelRule

        estimateContextForSureMatch, match, match
      • Methods inherited from class org.languagetool.rules.Rule

        addExamplePair, getAntiPatterns, 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

      • wordMap

        private static final java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> wordMap
    • Constructor Detail

      • WordCoherencyRule

        public WordCoherencyRule​(java.util.ResourceBundle messages)
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getWordMap

        protected java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> getWordMap()
        Specified by:
        getWordMap in class org.languagetool.rules.AbstractWordCoherencyRule
      • getMessage

        protected java.lang.String getMessage​(java.lang.String word1,
                                              java.lang.String word2)
        Specified by:
        getMessage in class org.languagetool.rules.AbstractWordCoherencyRule
      • 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