public abstract class AbstractWordCoherencyRule extends Rule
Note that this should not be used for language variations like American English vs. British English or German "alte Rechtschreibung" vs. "neue Rechtschreibung" -- that's the task of a spell checker.
| Constructor and Description |
|---|
AbstractWordCoherencyRule(ResourceBundle messages) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
getMessage(String word1,
String word2)
Get the message shown to the user if the rule matches.
|
protected abstract Map<String,String> |
getWordMap()
Maps words in both directions, e.g.
|
RuleMatch[] |
match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
void |
reset()
If a rule keeps its state over more than the check of one sentence, this
must be implemented so the internal state is reset.
|
addExamplePair, getCategory, getCorrectExamples, getDescription, getId, getIncorrectExamples, getLocQualityIssueType, getUrl, isDefaultOff, isDictionaryBasedSpellingRule, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setIncorrectExamples, setLocQualityIssueType, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic AbstractWordCoherencyRule(ResourceBundle messages) throws IOException
IOExceptionprotected abstract Map<String,String> getWordMap()
protected abstract String getMessage(String word1, String word2)
public RuleMatch[] match(AnalyzedSentence sentence)
Rule