public abstract class AbstractWordCoherencyRule extends TextLevelRule
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,Set<String>> |
getWordMap()
Maps words in both directions, e.g.
|
RuleMatch[] |
match(List<AnalyzedSentence> sentences) |
int |
minToCheckParagraph()
Gives back the minimum number of paragraphs to check to give back a correct result.
|
estimateContextForSureMatch, match, match
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDescription, getDistanceTokens, getErrorTriggeringExamples, getFullId, getId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasConfigurableValue, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
public AbstractWordCoherencyRule(ResourceBundle messages) throws IOException
IOException
protected abstract Map<String,Set<String>> getWordMap()
protected abstract String getMessage(String word1, String word2)
public RuleMatch[] match(List<AnalyzedSentence> sentences)
match
in class TextLevelRule
public int minToCheckParagraph()
TextLevelRule
minToCheckParagraph
in class TextLevelRule