Package org.languagetool.rules.de
Class GermanStyleRepeatedWordRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.AbstractStyleRepeatedWordRule
org.languagetool.rules.de.GermanStyleRepeatedWordRule
A rule checks the appearance of same words in a sentence or in two consecutive sentences.
Only substantive, verbs and adjectives are checked.
This rule detects no grammar error but a stylistic problem (default off)
- Author:
- Fred Kruse
-
Field Summary
Fields inherited from class org.languagetool.rules.AbstractStyleRepeatedWordRule
excludeDirectSpeech, lang, linguServices, maxDistanceOfSentences -
Constructor Summary
ConstructorsConstructorDescriptionGermanStyleRepeatedWordRule(ResourceBundle messages, Language lang, UserConfig userConfig) -
Method Summary
Modifier and TypeMethodDescriptiongetId()give the user the possibility to configure the functionprotected booleanisExceptionPair(AnalyzedTokenReadings token1, AnalyzedTokenReadings token2) protected booleanisPartOfWord(String testTokenText, String tokenText) protected booleanisTokenPair(AnalyzedTokenReadings[] tokens, int n, boolean before) Pairs of substantive are excluded like "Arm in Arm", "Seite an Seite", etc.protected booleanOnly substantive, names, verbs and adjectives are checkedprotected Stringprotected Stringprotected Stringprotected URLsetURL(AnalyzedTokenReadings token) Methods inherited from class org.languagetool.rules.AbstractStyleRepeatedWordRule
match, minToCheckParagraphMethods 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
-
GermanStyleRepeatedWordRule
-
-
Method Details
-
getId
- Overrides:
getIdin classAbstractStyleRepeatedWordRule
-
getDescription
- Overrides:
getDescriptionin classAbstractStyleRepeatedWordRule
-
messageSameSentence
- Specified by:
messageSameSentencein classAbstractStyleRepeatedWordRule
-
messageSentenceBefore
- Specified by:
messageSentenceBeforein classAbstractStyleRepeatedWordRule
-
messageSentenceAfter
- Specified by:
messageSentenceAfterin classAbstractStyleRepeatedWordRule
-
getRuleOptions
give the user the possibility to configure the function- Overrides:
getRuleOptionsin classAbstractStyleRepeatedWordRule
-
isTokenToCheck
Only substantive, names, verbs and adjectives are checked- Specified by:
isTokenToCheckin classAbstractStyleRepeatedWordRule
-
isTokenPair
Pairs of substantive are excluded like "Arm in Arm", "Seite an Seite", etc.- Specified by:
isTokenPairin classAbstractStyleRepeatedWordRule
-
isPartOfWord
- Overrides:
isPartOfWordin classAbstractStyleRepeatedWordRule
-
isExceptionPair
- Overrides:
isExceptionPairin classAbstractStyleRepeatedWordRule
-
setURL
- Overrides:
setURLin classAbstractStyleRepeatedWordRule- Throws:
MalformedURLException
-