Class SimpleReplaceDNVColloquialRule


  • public class SimpleReplaceDNVColloquialRule
    extends AbstractSimpleReplaceLemmasRule
    A rule that matches lemmas found only in DNV (AVL dictionary) and suggests alternative words. Catalan implementations. Loads the relevant lemmas from rules/ca/replace_dnv_colloquial.txt.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static com.google.common.cache.LoadingCache<java.lang.String,​java.util.Map<java.lang.String,​java.util.List<java.lang.String>>> cache  
      • Fields inherited from class org.languagetool.rules.AbstractSimpleReplaceRule

        ignoreTaggedWords
      • Fields inherited from class org.languagetool.rules.Rule

        messages
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleReplaceDNVColloquialRule​(java.util.ResourceBundle messages, org.languagetool.Language language)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDescription()  
      java.lang.String getId()  
      java.lang.String getMessage​(java.lang.String tokenStr, java.util.List<java.lang.String> replacements)  
      java.lang.String getShort()  
      • Methods inherited from class org.languagetool.rules.AbstractSimpleReplaceRule

        createRuleMatch, findMatches, isCheckLemmas, isTagged, loadFromPath, setCheckLemmas, setIgnoreTaggedWords
      • Methods inherited from class org.languagetool.rules.Rule

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

      • cache

        private static final com.google.common.cache.LoadingCache<java.lang.String,​java.util.Map<java.lang.String,​java.util.List<java.lang.String>>> cache
    • Constructor Detail

      • SimpleReplaceDNVColloquialRule

        public SimpleReplaceDNVColloquialRule​(java.util.ResourceBundle messages,
                                              org.languagetool.Language language)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getId

        public final java.lang.String getId()
        Overrides:
        getId in class org.languagetool.rules.AbstractSimpleReplaceRule
      • getDescription

        public java.lang.String getDescription()
        Overrides:
        getDescription in class org.languagetool.rules.AbstractSimpleReplaceRule
      • getShort

        public java.lang.String getShort()
        Overrides:
        getShort in class org.languagetool.rules.AbstractSimpleReplaceRule
      • getMessage

        public java.lang.String getMessage​(java.lang.String tokenStr,
                                           java.util.List<java.lang.String> replacements)
        Overrides:
        getMessage in class org.languagetool.rules.AbstractSimpleReplaceRule