Package org.languagetool.rules.de
Class ConjunctionAtBeginOfSentenceRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.AbstractStatisticSentenceStyleRule
org.languagetool.rules.de.ConjunctionAtBeginOfSentenceRule
A rule that gives Hints about the use of German filler words.
The Hints are only given when the percentage of filler words 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:
- 4.2
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConjunctionAtBeginOfSentenceRule(ResourceBundle messages, Language lang, UserConfig userConfig) -
Method Summary
Modifier and TypeMethodDescriptionprotected AnalyzedTokenReadingsconditionFulfilled(List<AnalyzedTokenReadings> sentence) Is sentence with modal verbprotected booleanCondition to generate a hint related to the sentence (possibly including all exceptions)A short description of the error this rule can detect, usually in the language of the text that is checked.getId()A string used to identify the rule in e.g.protected StringgetLimitMessage(int limit, double percent) Defines the message for hints which exceed the limitprivate static booleanisComma(AnalyzedTokenReadings token) Token is commaprivate static booleanWord is a ConjunctionMethods inherited from class org.languagetool.rules.AbstractStatisticSentenceStyleRule
denominator, getNumberOfMatches, getRuleOptions, getSentenceCount, isMark, isOpeningQuote, 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
-
Field Details
-
DEFAULT_MIN_PERCENT
private static final int DEFAULT_MIN_PERCENT- See Also:
-
sentenceMessage
String sentenceMessage
-
-
Constructor Details
-
ConjunctionAtBeginOfSentenceRule
public ConjunctionAtBeginOfSentenceRule(ResourceBundle messages, Language lang, UserConfig userConfig)
-
-
Method Details
-
isConjunction
Word is a Conjunction -
isComma
Token is comma -
conditionFulfilled
Is sentence with modal verb- Specified by:
conditionFulfilledin classAbstractStatisticSentenceStyleRule
-
excludeDirectSpeech
protected boolean excludeDirectSpeech()Description copied from class:AbstractStatisticSentenceStyleRuleCondition to generate a hint related to the sentence (possibly including all exceptions)- Specified by:
excludeDirectSpeechin classAbstractStatisticSentenceStyleRule
-
getLimitMessage
Description copied from class:AbstractStatisticSentenceStyleRuleDefines the message for hints which exceed the limit- Specified by:
getLimitMessagein classAbstractStatisticSentenceStyleRule
-
getId
Description copied from class:RuleA string used to identify the rule in e.g. configuration files. This string is supposed to be unique and to stay the same in all upcoming versions of LanguageTool. It's supposed to contain only the charactersA-Zand the underscore. -
getDescription
Description copied from class:RuleA short description of the error this rule can detect, usually in the language of the text that is checked.- Specified by:
getDescriptionin classRule
-
getConfigureText
- Specified by:
getConfigureTextin classAbstractStatisticSentenceStyleRule
-