Package org.languagetool.rules.de
Class UnnecessaryPhraseRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.AbstractStatisticStyleRule
org.languagetool.rules.de.UnnecessaryPhraseRule
A rule that gives Hints about the use of German phrases.
The Hints are only given when the percentage of phrases per chapter/text exceeds the given limit.
A limit of 0 shows all used filler words. Direct speech or citation is excluded otherwise.
This rule detects no grammar error but gives stylistic hints (default off).
- Since:
- 5.3
- Author:
- Fred Kruse
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionUnnecessaryPhraseRule(ResourceBundle messages, Language lang, UserConfig userConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected intconditionFulfilled(AnalyzedTokenReadings[] tokens, int nAnalysedToken) doubleMinimal value is given in per milprotected booleangetId()protected StringgetLimitMessage(int limit, double percent) protected Stringprotected booleansentenceConditionFulfilled(AnalyzedTokenReadings[] tokens, int nToken) Methods inherited from class org.languagetool.rules.AbstractStatisticStyleRule
getNumberOfMatches, getRuleOptions, getWordCount, match, minToCheckParagraph, setWithoutDirectSpeechMethods inherited from class org.languagetool.rules.TextLevelRule
estimateContextForSureMatch, match, matchMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, 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, useInOffice
-
Constructor Details
-
UnnecessaryPhraseRule
-
-
Method Details
-
denominator
public double denominator()Minimal value is given in per mil- Overrides:
denominatorin classAbstractStatisticStyleRule
-
conditionFulfilled
- Specified by:
conditionFulfilledin classAbstractStatisticStyleRule
-
sentenceConditionFulfilled
- Specified by:
sentenceConditionFulfilledin classAbstractStatisticStyleRule
-
excludeDirectSpeech
protected boolean excludeDirectSpeech()- Specified by:
excludeDirectSpeechin classAbstractStatisticStyleRule
-
getLimitMessage
- Specified by:
getLimitMessagein classAbstractStatisticStyleRule
-
getSentenceMessage
- Specified by:
getSentenceMessagein classAbstractStatisticStyleRule
-
getId
-
getDescription
- Specified by:
getDescriptionin classRule
-
getConfigurePercentText
- Specified by:
getConfigurePercentTextin classAbstractStatisticStyleRule
-
getConfigureWithoutDirectSpeachText
- Specified by:
getConfigureWithoutDirectSpeachTextin classAbstractStatisticStyleRule
-