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.Rule
A 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>
lcToProperSpelling
private static int
maxLen
private 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 boolean
allWordsUppercase(java.lang.String s)
java.lang.String
getDescription()
java.lang.String
getId()
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:
getId
in classorg.languagetool.rules.Rule
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescription
in classorg.languagetool.rules.Rule
-
match
public org.languagetool.rules.RuleMatch[] match(org.languagetool.AnalyzedSentence sentence)
- Specified by:
match
in classorg.languagetool.rules.Rule
-
allWordsUppercase
private boolean allWordsUppercase(java.lang.String s)
-
-