Package org.languagetool.rules.ca
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
FieldsModifier and TypeFieldDescriptionprivate static final Locale
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private static final Pattern
private CatalanSynthesizer
Fields inherited from class org.languagetool.rules.AbstractSimpleReplaceRule
ignoreTaggedWords
Fields inherited from class org.languagetool.rules.Rule
messages
-
Constructor Summary
ConstructorsConstructorDescriptionReplaceOperationNamesRule
(ResourceBundle messages, org.languagetool.Language language) -
Method Summary
Modifier and TypeMethodDescriptionfinal String
getId()
getMessage
(String tokenStr, List<String> replacements) getShort()
final org.languagetool.rules.RuleMatch[]
match
(org.languagetool.AnalyzedSentence sentence) private boolean
matchPostagRegexp
(org.languagetool.AnalyzedTokenReadings aToken, Pattern pattern) Match POS tag with regular expressionMethods 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
-
Field Details
-
wrongWords
-
CA_LOCALE
-
synth
-
PrevToken_POS
-
PrevToken_POS_Excep
-
NextToken_POS_Excep
-
PUNTUACIO
-
DETERMINANT
-
-
Constructor Details
-
ReplaceOperationNamesRule
public ReplaceOperationNamesRule(ResourceBundle messages, org.languagetool.Language language) throws IOException - Throws:
IOException
-
-
Method Details
-
getWrongWords
- Specified by:
getWrongWords
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getId
- Overrides:
getId
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getDescription
- Overrides:
getDescription
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getShort
- Overrides:
getShort
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getMessage
- Overrides:
getMessage
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getLocale
- Overrides:
getLocale
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
match
public final org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence) - Overrides:
match
in classorg.languagetool.rules.AbstractSimpleReplaceRule
-
matchPostagRegexp
Match POS tag with regular expression
-