Package org.languagetool.rules.en
Class EnglishWordRepeatRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.WordRepeatRule
org.languagetool.rules.en.EnglishWordRepeatRule
public class EnglishWordRepeatRule
extends org.languagetool.rules.WordRepeatRule
Word repeat rule for English, to avoid false alarms in the generic word repetition rule.
-
Field Summary
Fields inherited from class org.languagetool.rules.Rule
messages
-
Constructor Summary
ConstructorsConstructorDescriptionEnglishWordRepeatRule
(ResourceBundle messages, org.languagetool.Language language) -
Method Summary
Modifier and TypeMethodDescriptiongetId()
boolean
ignore
(org.languagetool.AnalyzedTokenReadings[] tokens, int position) private boolean
private boolean
wordRepetitionOf
(String word, org.languagetool.AnalyzedTokenReadings[] tokens, int position) Methods inherited from class org.languagetool.rules.WordRepeatRule
createRuleMatch, estimateContextForSureMatch, getDescription, match
Methods inherited from class org.languagetool.rules.Rule
addExamplePair, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
-
Constructor Details
-
EnglishWordRepeatRule
-
-
Method Details
-
getId
- Overrides:
getId
in classorg.languagetool.rules.WordRepeatRule
-
ignore
public boolean ignore(org.languagetool.AnalyzedTokenReadings[] tokens, int position) - Overrides:
ignore
in classorg.languagetool.rules.WordRepeatRule
-
posIsIn
private boolean posIsIn(org.languagetool.AnalyzedTokenReadings[] tokens, int position, String... posTags) -
wordRepetitionOf
private boolean wordRepetitionOf(String word, org.languagetool.AnalyzedTokenReadings[] tokens, int position)
-