Class ReplaceOperationNamesRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.AbstractSimpleReplaceRule
org.languagetool.rules.ca.ReplaceOperationNamesRule

public class ReplaceOperationNamesRule extends org.languagetool.rules.AbstractSimpleReplaceRule
A rule that suggests better names for technical operation names Loads the relevant words from /ca/replace_operationnames.txt.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Locale
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
    private static final Pattern
     
     
    private static final Map<String,List<String>>
     

    Fields inherited from class org.languagetool.rules.AbstractSimpleReplaceRule

    ignoreTaggedWords

    Fields inherited from class org.languagetool.rules.Rule

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReplaceOperationNamesRule(ResourceBundle messages, org.languagetool.Language language)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    final String
     
     
    getMessage(String tokenStr, List<String> replacements)
     
     
    protected Map<String,List<String>>
     
    final org.languagetool.rules.RuleMatch[]
    match(org.languagetool.AnalyzedSentence sentence)
     
    private boolean
    matchPostagRegexp(org.languagetool.AnalyzedTokenReadings aToken, Pattern pattern)
    Match POS tag with regular expression

    Methods inherited from class org.languagetool.rules.AbstractSimpleReplaceRule

    createRuleMatch, findMatches, isCaseSensitive, 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 Details

    • wrongWords

      private static final Map<String,List<String>> wrongWords
    • CA_LOCALE

      private static final Locale CA_LOCALE
    • synth

      private CatalanSynthesizer synth
    • PrevToken_POS

      private static final Pattern PrevToken_POS
    • PrevToken_POS_Excep

      private static final Pattern PrevToken_POS_Excep
    • NextToken_POS_Excep

      private static final Pattern NextToken_POS_Excep
    • PUNTUACIO

      private static final Pattern PUNTUACIO
    • DETERMINANT

      private static final Pattern DETERMINANT
  • Constructor Details

  • Method Details

    • getWrongWords

      protected Map<String,List<String>> getWrongWords()
      Specified by:
      getWrongWords in class org.languagetool.rules.AbstractSimpleReplaceRule
    • getId

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

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

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

      public String getMessage(String tokenStr, List<String> replacements)
      Overrides:
      getMessage in class org.languagetool.rules.AbstractSimpleReplaceRule
    • getLocale

      public Locale getLocale()
      Overrides:
      getLocale in class org.languagetool.rules.AbstractSimpleReplaceRule
    • match

      public final org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence)
      Overrides:
      match in class org.languagetool.rules.AbstractSimpleReplaceRule
    • matchPostagRegexp

      private boolean matchPostagRegexp(org.languagetool.AnalyzedTokenReadings aToken, Pattern pattern)
      Match POS tag with regular expression