Package org.languagetool.rules.gl
Class CastWordsRule
- java.lang.Object
-
- org.languagetool.rules.Rule
-
- org.languagetool.rules.AbstractSimpleReplaceRule
-
- org.languagetool.rules.gl.CastWordsRule
-
public class CastWordsRule extends org.languagetool.rules.AbstractSimpleReplaceRuleA rule that matches words or phrases which should not be used and suggests correct ones instead. Galician implementation. Loads the list of words fromrules/gl/spanish.txt.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringGL_CAST_WORDS_RULEprivate static java.util.LocaleGL_LOCALEprivate static java.util.Map<java.lang.String,java.util.List<java.lang.String>>wrongWords
-
Constructor Summary
Constructors Constructor Description CastWordsRule(java.util.ResourceBundle messages)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()java.lang.StringgetId()java.util.LocalegetLocale()java.lang.StringgetMessage(java.lang.String tokenStr, java.util.List<java.lang.String> replacements)java.lang.StringgetShort()protected java.util.Map<java.lang.String,java.util.List<java.lang.String>>getWrongWords()booleanisCaseSensitive()-
Methods inherited from class org.languagetool.rules.AbstractSimpleReplaceRule
createRuleMatch, findMatches, isCheckLemmas, isTagged, loadFromPath, match, 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 Detail
-
GL_CAST_WORDS_RULE
public static final java.lang.String GL_CAST_WORDS_RULE
- See Also:
- Constant Field Values
-
wrongWords
private static final java.util.Map<java.lang.String,java.util.List<java.lang.String>> wrongWords
-
GL_LOCALE
private static final java.util.Locale GL_LOCALE
-
-
Method Detail
-
getWrongWords
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> getWrongWords()
- Specified by:
getWrongWordsin classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getId
public final java.lang.String getId()
- Overrides:
getIdin classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getDescription
public java.lang.String getDescription()
- Overrides:
getDescriptionin classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getShort
public java.lang.String getShort()
- Overrides:
getShortin classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getMessage
public java.lang.String getMessage(java.lang.String tokenStr, java.util.List<java.lang.String> replacements)- Overrides:
getMessagein classorg.languagetool.rules.AbstractSimpleReplaceRule
-
isCaseSensitive
public boolean isCaseSensitive()
- Overrides:
isCaseSensitivein classorg.languagetool.rules.AbstractSimpleReplaceRule
-
getLocale
public java.util.Locale getLocale()
- Overrides:
getLocalein classorg.languagetool.rules.AbstractSimpleReplaceRule
-
-