Class SimilarNameRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.TextLevelRule
org.languagetool.rules.de.SimilarNameRule
public class SimilarNameRule
extends org.languagetool.rules.TextLevelRule
Search for names similar to ones used before in the same text, as these
might be typos. Note: this rule if off by default, as it only works on known
names and the internal dictionary doesn't know that many names.
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final intFields inherited from class org.languagetool.rules.Rule
messages -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.languagetool.rules.TextLevelRule
estimateContextForSureMatch, match, matchMethods 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
-
Field Details
-
MIN_LENGTH
private static final int MIN_LENGTH- See Also:
-
MAX_DIFF
private static final int MAX_DIFF- See Also:
-
-
Constructor Details
-
SimilarNameRule
-
-
Method Details
-
getId
- Specified by:
getIdin classorg.languagetool.rules.Rule
-
getDescription
- Specified by:
getDescriptionin classorg.languagetool.rules.Rule
-
match
public org.languagetool.rules.RuleMatch[] match(List<org.languagetool.AnalyzedSentence> sentences) throws IOException - Specified by:
matchin classorg.languagetool.rules.TextLevelRule- Throws:
IOException
-
similarName
-
minToCheckParagraph
public int minToCheckParagraph()- Specified by:
minToCheckParagraphin classorg.languagetool.rules.TextLevelRule
-