Package org.languagetool.rules.en
Class SpecificCaseRule
- java.lang.Object
-
- org.languagetool.rules.Rule
-
- org.languagetool.rules.en.SpecificCaseRule
-
public class SpecificCaseRule extends org.languagetool.rules.RuleA rule that matches words which are complex and suggests easier to understand alternatives.- Since:
- 4.8
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,java.lang.String>lcToProperSpellingprivate static intmaxLenprivate static java.util.Set<java.lang.String>phrases
-
Constructor Summary
Constructors Constructor Description SpecificCaseRule(java.util.ResourceBundle messages)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanallWordsUppercase(java.lang.String s)java.lang.StringgetDescription()java.lang.StringgetId()private static java.util.List<java.lang.String>loadPhrases(java.lang.String path)org.languagetool.rules.RuleMatch[]match(org.languagetool.AnalyzedSentence sentence)-
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
-
-
-
-
Method Detail
-
loadPhrases
private static java.util.List<java.lang.String> loadPhrases(java.lang.String path)
-
getId
public final java.lang.String getId()
- Specified by:
getIdin classorg.languagetool.rules.Rule
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin classorg.languagetool.rules.Rule
-
match
public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence)
- Specified by:
matchin classorg.languagetool.rules.Rule
-
allWordsUppercase
private boolean allWordsUppercase(java.lang.String s)
-
-