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() |
protected String |
getLemmaForPosTagStartsWith(String startPos,
AnalyzedTokenReadings token) |
protected abstract String |
getLimitMessage(int minPercent)
Defines the message for hints which exceed the limit
|
RuleOption[] |
getRuleOptions()
give the user the possibility to configure the function
|
Map<String,Integer> |
getWordMap() |
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, matchaddExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getCorrectExamples, getDescription, getDistanceTokens, getErrorTriggeringExamples, getFullId, getId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isIncludedInHiddenMatches, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncludedInHiddenMatches, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setPriority, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic 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()
public RuleOption[] getRuleOptions()
getRuleOptions in class Rulepublic void setWithoutDirectSpeech(boolean withoutDirectSpeech)
public RuleMatch[] match(List<AnalyzedSentence> sentences) throws IOException
match in class TextLevelRuleIOExceptionpublic int minToCheckParagraph()
TextLevelRuleminToCheckParagraph in class TextLevelRuleprotected String getLemmaForPosTagStartsWith(String startPos, AnalyzedTokenReadings token)