Package org.languagetool.rules.uk
Class UkrainianWordRepeatRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.WordRepeatRule
org.languagetool.rules.uk.UkrainianWordRepeatRule
- Since:
- 2.9
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RuleMatchcreateRuleMatch(String prevToken, String token, int prevPos, int pos, String msg, AnalyzedSentence sentence) getId()A string used to identify the rule in e.g.booleanignore(AnalyzedTokenReadings[] tokens, int position) Implement this method to returntrueif there's a potential word repetition at the current position that should be ignored, i.e.private booleanisInitial(AnalyzedToken analyzedToken, AnalyzedTokenReadings[] tokens, int position) Methods inherited from class org.languagetool.rules.WordRepeatRule
estimateContextForSureMatch, getDescription, match, wordRepetitionOfMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, 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
-
DATE_TIME_NUM_PATTERN
-
REPEAT_ALLOWED_SET
-
REPEAT_ALLOWED_CAPS_SET
-
-
Constructor Details
-
UkrainianWordRepeatRule
-
-
Method Details
-
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.- Overrides:
getIdin classWordRepeatRule
-
ignore
Description copied from class:WordRepeatRuleImplement this method to returntrueif there's a potential word repetition at the current position that should be ignored, i.e. if no error should be created.- Overrides:
ignorein classWordRepeatRule- Parameters:
tokens- the tokens of the sentence currently being checkedposition- the current position in the tokens- Returns:
- this implementation always returns false
-
isInitial
private boolean isInitial(AnalyzedToken analyzedToken, AnalyzedTokenReadings[] tokens, int position) -
createRuleMatch
protected RuleMatch createRuleMatch(String prevToken, String token, int prevPos, int pos, String msg, AnalyzedSentence sentence) - Overrides:
createRuleMatchin classWordRepeatRule
-