Package org.languagetool.rules.de
Class GermanSpellerRule
- Direct Known Subclasses:
AustrianGermanSpellerRule,SwissGermanSpellerRule
-
Field Summary
FieldsFields inherited from class org.languagetool.rules.spelling.hunspell.HunspellRule
FILE_EXTENSION, hunspell, nonWordPatternFields inherited from class org.languagetool.rules.spelling.SpellingCheckRule
CUSTOM_SPELLING_FILE, GLOBAL_SPELLING_FILE, HIGH_CONFIDENCE, ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, wordListLoader, wordsToBeIgnored -
Constructor Summary
ConstructorsConstructorDescriptionGermanSpellerRule(ResourceBundle messages, German language) GermanSpellerRule(ResourceBundle messages, German language, UserConfig userConfig, String languageVariantPlainTextDict) GermanSpellerRule(ResourceBundle messages, German language, UserConfig userConfig, String languageVariantPlainTextDict, List<Language> altLanguages, LanguageModel languageModel) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidaddIgnoreWords(String origLine) protected voidaddProhibitedWords(List<String> words) protected RuleMatchcreateWrongSplitMatch(AnalyzedSentence sentence, List<RuleMatch> ruleMatchesSoFar, int pos, String coveredWord, String suggestion1, String suggestion2, int prevPos) expandLine(String line) protected voidfilterForLanguage(List<String> suggestions) protected List<SuggestedReplacement>protected List<SuggestedReplacement>getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) getCandidates(String word) getFilteredSuggestions(List<String> wordsOrPhrases) getId()protected StringgetMessage(String origWord, SuggestedReplacement firstSuggestion) protected List<SuggestedReplacement>getOnlySuggestions(String word) protected static MorfologikMultiSpellergetSpeller(Language language, UserConfig userConfig, String languageVariantPlainTextDict) getSpellingFilePaths(String langCode) getSuggestions(String word) protected booleanprotected booleanignoreWord(List<String> words, int idx) protected voidinit()protected booleanisIgnoredNoCase(String word) booleanisMisspelled(String word) protected booleanisProhibited(String word) protected booleanisQuotedCompound(AnalyzedSentence analyzedSentence, int idx, String token) match(AnalyzedSentence sentence) protected booleanprocessThreePartCompound(List<String> parts) sortSuggestionByQuality(String misspelling, List<String> suggestions) Methods inherited from class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
getCandidates, getStreamsMethods inherited from class org.languagetool.rules.spelling.hunspell.HunspellRule
ensureInitialized, getActiveChecks, getDescription, getDictFilenameInResources, getSentenceTextWithoutUrlsAndImmunizedTokens, getShortMessage, isInIgnoredSet, tokenizeTextMethods inherited from class org.languagetool.rules.spelling.SpellingCheckRule
acceptPhrases, addIgnoreTokens, addSuggestionsToRuleMatch, filterDupes, filterSuggestions, getAdditionalProhibitFileNames, getAdditionalSpellingFileNames, getAdditionalSuggestions, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getProhibitFileName, getSpellingFileName, ignoreToken, ignoreWord, isDictionaryBasedSpellingRule, isEMail, isLatinScript, isUrl, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWord, tokenizeNewWordsMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, 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
-
RULE_ID
- See Also:
-
-
Constructor Details
-
GermanSpellerRule
-
GermanSpellerRule
public GermanSpellerRule(ResourceBundle messages, German language, UserConfig userConfig, String languageVariantPlainTextDict) - Since:
- 4.2
-
GermanSpellerRule
public GermanSpellerRule(ResourceBundle messages, German language, UserConfig userConfig, String languageVariantPlainTextDict, List<Language> altLanguages, LanguageModel languageModel) - Since:
- 4.3
-
-
Method Details
-
match
- Overrides:
matchin classHunspellRule- Throws:
IOException
-
init
- Overrides:
initin classHunspellRule- Throws:
IOException
-
getId
- Overrides:
getIdin classHunspellRule
-
isIgnoredNoCase
- Overrides:
isIgnoredNoCasein classSpellingCheckRule
-
getMessage
- Overrides:
getMessagein classHunspellRule
-
getCandidates
- Overrides:
getCandidatesin classCompoundAwareHunspellRule
-
isProhibited
- Overrides:
isProhibitedin classSpellingCheckRule
-
addIgnoreWords
- Overrides:
addIgnoreWordsin classSpellingCheckRule
-
expandLine
- Overrides:
expandLinein classSpellingCheckRule
-
createWrongSplitMatch
protected RuleMatch createWrongSplitMatch(AnalyzedSentence sentence, List<RuleMatch> ruleMatchesSoFar, int pos, String coveredWord, String suggestion1, String suggestion2, int prevPos) - Overrides:
createWrongSplitMatchin classSpellingCheckRule
-
getSuggestions
- Overrides:
getSuggestionsin classCompoundAwareHunspellRule- Throws:
IOException
-
acceptSuggestion
- Overrides:
acceptSuggestionin classHunspellRule
-
getSpellingFilePaths
-
getSpeller
@Nullable protected static MorfologikMultiSpeller getSpeller(Language language, UserConfig userConfig, String languageVariantPlainTextDict) -
filterForLanguage
- Specified by:
filterForLanguagein classCompoundAwareHunspellRule
-
sortSuggestionByQuality
- Overrides:
sortSuggestionByQualityin classCompoundAwareHunspellRule
-
getFilteredSuggestions
- Overrides:
getFilteredSuggestionsin classCompoundAwareHunspellRule
-
isMisspelled
- Overrides:
isMisspelledin classHunspellRule
-
ignoreWord
- Overrides:
ignoreWordin classSpellingCheckRule- Throws:
IOException
-
ignorePotentiallyMisspelledWord
- Overrides:
ignorePotentiallyMisspelledWordin classSpellingCheckRule- Throws:
IOException
-
processThreePartCompound
- Throws:
IOException
-
getAdditionalTopSuggestions
protected List<SuggestedReplacement> getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) throws IOException - Overrides:
getAdditionalTopSuggestionsin classSpellingCheckRule- Throws:
IOException
-
isQuotedCompound
- Overrides:
isQuotedCompoundin classHunspellRule
-
addProhibitedWords
- Overrides:
addProhibitedWordsin classSpellingCheckRule
-
filterNoSuggestWords
- Overrides:
filterNoSuggestWordsin classSpellingCheckRule
-
getOnlySuggestions
- Overrides:
getOnlySuggestionsin classSpellingCheckRule
-