public abstract class AbstractCompoundRule extends Rule
Modifier and Type | Field and Description |
---|---|
protected boolean |
sentenceStartsWithUpperCase |
Constructor and Description |
---|
AbstractCompoundRule(ResourceBundle messages,
String withHyphenMessage,
String withoutHyphenMessage,
String withOrWithoutHyphenMessage) |
AbstractCompoundRule(ResourceBundle messages,
String withHyphenMessage,
String withoutHyphenMessage,
String withOrWithoutHyphenMessage,
String shortMessage) |
Modifier and Type | Method and Description |
---|---|
int |
estimateContextForSureMatch()
A number that estimates how many words there must be after a match before we
can be (relatively) sure the match is valid.
|
protected abstract CompoundRuleData |
getCompoundRuleData() |
abstract String |
getDescription()
A short description of the error this rule can detect, usually in the language of the text
that is checked.
|
abstract String |
getId()
A string used to identify the rule in e.g. configuration files.
|
boolean |
isHyphenIgnored()
Flag to indicate if the hyphen is ignored in the text entered by the user.
|
RuleMatch[] |
match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
addExamplePair, addTags, cacheAntiPatterns, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getTags, getUrl, hasConfigurableValue, hasTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setExamplePair, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setTags, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
public AbstractCompoundRule(ResourceBundle messages, String withHyphenMessage, String withoutHyphenMessage, String withOrWithoutHyphenMessage) throws IOException
IOException
public AbstractCompoundRule(ResourceBundle messages, String withHyphenMessage, String withoutHyphenMessage, String withOrWithoutHyphenMessage, String shortMessage) throws IOException
IOException
public abstract String getId()
Rule
A-Z
and the underscore.public abstract String getDescription()
Rule
getDescription
in class Rule
public int estimateContextForSureMatch()
Rule
-1
when the sentence needs to end to be sure there's a match.estimateContextForSureMatch
in class Rule
protected abstract CompoundRuleData getCompoundRuleData()
public boolean isHyphenIgnored()
public RuleMatch[] match(AnalyzedSentence sentence)
Rule