public abstract class AbstractStatisticSentenceStyleRule extends TextLevelRule
| Constructor and Description |
|---|
AbstractStatisticSentenceStyleRule(ResourceBundle messages,
Language lang,
UserConfig userConfig,
int minPercent) |
AbstractStatisticSentenceStyleRule(ResourceBundle messages,
Language lang,
UserConfig userConfig,
int minPercent,
boolean defaultActive) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract AnalyzedTokenReadings |
conditionFulfilled(List<AnalyzedTokenReadings> tokens)
Condition to generate a hint (possibly including all exceptions)
Returns:
< nAnalysedToken, if condition is not fulfilled
>= nAnalysedToken, if condition is not fulfilled; integer is number of token which is the end hint
|
double |
denominator()
Override, if value should be given in an other unity than percent
|
protected abstract boolean |
excludeDirectSpeech()
Condition to generate a hint related to the sentence (possibly including all exceptions)
|
abstract String |
getConfigureText() |
protected abstract String |
getLimitMessage(int limit,
double percent)
Defines the message for hints which exceed the limit
|
int |
getNumberOfMatches() |
RuleOption[] |
getRuleOptions()
give the user the possibility to configure the function
|
int |
getSentenceCount() |
protected boolean |
isMark(AnalyzedTokenReadings token) |
protected boolean |
isOpeningQuote(AnalyzedTokenReadings token) |
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) |
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 AbstractStatisticSentenceStyleRule(ResourceBundle messages, Language lang, UserConfig userConfig, int minPercent, boolean defaultActive)
public AbstractStatisticSentenceStyleRule(ResourceBundle messages, Language lang, UserConfig userConfig, int minPercent)
protected abstract AnalyzedTokenReadings conditionFulfilled(List<AnalyzedTokenReadings> tokens)
protected abstract boolean excludeDirectSpeech()
protected abstract String getLimitMessage(int limit, double percent)
public abstract String getConfigureText()
protected boolean isMark(AnalyzedTokenReadings token)
protected boolean isOpeningQuote(AnalyzedTokenReadings token)
public double denominator()
public RuleOption[] getRuleOptions()
getRuleOptions in class Rulepublic int getSentenceCount()
public int getNumberOfMatches()
public void setWithoutDirectSpeech(boolean withoutDirectSpeech)
public RuleMatch[] match(List<AnalyzedSentence> sentences) throws IOException
match in class TextLevelRuleIOExceptionpublic int minToCheckParagraph()
TextLevelRuleminToCheckParagraph in class TextLevelRule