public abstract class AbstractStyleTooOftenUsedWordRule extends TextLevelRule
Constructor and Description |
---|
AbstractStyleTooOftenUsedWordRule(ResourceBundle messages,
Language lang,
UserConfig userConfig,
int minPercent) |
AbstractStyleTooOftenUsedWordRule(ResourceBundle messages,
Language lang,
UserConfig userConfig,
int minPercent,
boolean defaultActive) |
Modifier and Type | Method and Description |
---|---|
abstract String |
getConfigureText()
Overwrite this to define the Text in the option panel for the configurable value
|
int |
getDefaultValue()
Overwrite this to get a default Integer value by option panel
|
protected abstract String |
getLimitMessage(int minPercent)
Defines the message for hints which exceed the limit
|
int |
getMaxConfigurableValue()
Overwrite this to define the maximum of a configurable value
|
int |
getMinConfigurableValue()
Overwrite this to define the minimum of a configurable value
|
Map<String,Integer> |
getWordMap() |
boolean |
hasConfigurableValue()
Overwrite this to return true, if a value may be configured by option panel
|
protected abstract boolean |
isException(AnalyzedTokenReadings token)
An exception is defined for the token
|
protected abstract boolean |
isToCountedWord(AnalyzedTokenReadings token)
A token that has to be counted
|
RuleMatch[] |
match(List<AnalyzedSentence> sentences) |
int |
minToCheckParagraph()
Gives back the minimum number of paragraphs to check to give back a correct result.
|
void |
setWithoutDirectSpeech(boolean withoutDirectSpeech) |
protected abstract String |
toAddedLemma(AnalyzedTokenReadings token)
Gives back the lemma that should be added to the word map
|
estimateContextForSureMatch, match, match
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getCorrectExamples, getDescription, getDistanceTokens, getErrorTriggeringExamples, getFullId, getId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, 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 AbstractStyleTooOftenUsedWordRule(ResourceBundle messages, Language lang, UserConfig userConfig, int minPercent)
public AbstractStyleTooOftenUsedWordRule(ResourceBundle messages, Language lang, UserConfig userConfig, int minPercent, boolean defaultActive)
protected abstract boolean isToCountedWord(AnalyzedTokenReadings token)
protected abstract boolean isException(AnalyzedTokenReadings token)
protected abstract String toAddedLemma(AnalyzedTokenReadings token)
protected abstract String getLimitMessage(int minPercent)
public abstract String getConfigureText()
Rule
getConfigureText
in class Rule
public boolean hasConfigurableValue()
Rule
hasConfigurableValue
in class Rule
public int getDefaultValue()
Rule
getDefaultValue
in class Rule
public int getMinConfigurableValue()
Rule
getMinConfigurableValue
in class Rule
public int getMaxConfigurableValue()
Rule
getMaxConfigurableValue
in class Rule
public void setWithoutDirectSpeech(boolean withoutDirectSpeech)
public RuleMatch[] match(List<AnalyzedSentence> sentences) throws IOException
match
in class TextLevelRule
IOException
public int minToCheckParagraph()
TextLevelRule
minToCheckParagraph
in class TextLevelRule