Class GermanSpellerRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.spelling.SpellingCheckRule
org.languagetool.rules.spelling.hunspell.HunspellRule
org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
org.languagetool.rules.de.GermanSpellerRule
- Direct Known Subclasses:
AustrianGermanSpellerRule, SwissGermanSpellerRule
public class GermanSpellerRule
extends org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GermanCompoundTokenizerprivate final LineExpanderprivate static final intprivate static final Patternstatic final Stringprivate static final de.danielnaber.jwordsplitter.GermanWordSplitterprivate final org.languagetool.synthesis.Synthesizerprivate final org.languagetool.tagging.TaggerFields inherited from class org.languagetool.rules.spelling.hunspell.HunspellRule
FILE_EXTENSION, hunspellDict, needsInit, nonWordPattern, suggestionsOrdererFields inherited from class org.languagetool.rules.spelling.SpellingCheckRule
ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, wordListLoaderFields inherited from class org.languagetool.rules.Rule
messages -
Constructor Summary
ConstructorsConstructorDescriptionGermanSpellerRule(ResourceBundle messages, German language) GermanSpellerRule(ResourceBundle messages, German language, org.languagetool.UserConfig userConfig, String languageVariantPlainTextDict) GermanSpellerRule(ResourceBundle messages, German language, org.languagetool.UserConfig userConfig, String languageVariantPlainTextDict, List<org.languagetool.Language> altLanguages, org.languagetool.languagemodel.LanguageModel languageModel) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddIgnoreWords(String origLine) protected voidaddProhibitedWords(List<String> words) private @Nullable StringexpandLine(String line) protected voidfilterForLanguage(List<String> suggestions) private StringgetAdditionalTopSuggestions(List<String> suggestions, String word) getCandidates(String word) getFilteredSuggestions(List<String> wordsOrPhrases) getId()private @Nullable StringgetParticipleForBaseform(String baseform) private @Nullable Stringprivate @Nullable Stringprivate static @Nullable org.languagetool.rules.spelling.morfologik.MorfologikMultiSpellergetSpeller(org.languagetool.Language language, org.languagetool.UserConfig userConfig, String languageVariantPlainTextDict) private static de.danielnaber.jwordsplitter.GermanWordSplittergetSuggestions(String word) private @Nullable StringgetWordAfterEnumerationOrNull(List<String> words, int idx) private booleanignoreByHangingHyphen(List<String> words, int idx) private booleanprivate booleanignoreElative(String word) protected booleanignoreWord(List<String> words, int idx) protected voidinit()protected booleanisAcceptedWordFromLanguage(org.languagetool.Language language, String word) booleanisMisspelled(String word) private booleanisNeedingFugenS(String word) private booleanprotected booleanisProhibited(String word) protected booleanisQuotedCompound(org.languagetool.AnalyzedSentence analyzedSentence, int idx, String token) private static voidprivate static voidprivate static voidsortSuggestionByQuality(String misspelling, List<String> suggestions) Methods inherited from class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
getCandidatesMethods inherited from class org.languagetool.rules.spelling.hunspell.HunspellRule
getActiveChecks, getDescription, getDictFilenameInResources, getSentenceTextWithoutUrlsAndImmunizedTokens, match, tokenizeTextMethods inherited from class org.languagetool.rules.spelling.SpellingCheckRule
acceptedInAlternativeLanguage, acceptPhrases, addIgnoreTokens, addSuggestionsToRuleMatch, createWrongSplitMatch, filterDupes, filterSuggestions, getAdditionalProhibitFileNames, getAdditionalSpellingFileNames, getAdditionalSuggestions, getAlternativeLangSpellingRules, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getProhibitFileName, getSpellingFileName, ignoreToken, ignoreWord, isDictionaryBasedSpellingRule, isEMail, isUrl, reorderSuggestions, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWordMethods inherited from class org.languagetool.rules.Rule
addExamplePair, estimateContextForSureMatch, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
-
Field Details
-
RULE_ID
- See Also:
-
MAX_EDIT_DISTANCE
private static final int MAX_EDIT_DISTANCE- See Also:
-
PREVENT_SUGGESTION
-
wordsToBeIgnoredInCompounds
-
wordStartsToBeProhibited
-
wordEndingsToBeProhibited
-
ADDITIONAL_SUGGESTIONS
-
splitter
private static final de.danielnaber.jwordsplitter.GermanWordSplitter splitter -
lineExpander
-
compoundTokenizer
-
synthesizer
private final org.languagetool.synthesis.Synthesizer synthesizer -
tagger
private final org.languagetool.tagging.Tagger tagger
-
-
Constructor Details
-
GermanSpellerRule
-
GermanSpellerRule
public GermanSpellerRule(ResourceBundle messages, German language, org.languagetool.UserConfig userConfig, String languageVariantPlainTextDict) - Since:
- 4.2
-
GermanSpellerRule
public GermanSpellerRule(ResourceBundle messages, German language, org.languagetool.UserConfig userConfig, String languageVariantPlainTextDict, List<org.languagetool.Language> altLanguages, org.languagetool.languagemodel.LanguageModel languageModel) - Since:
- 4.3
-
-
Method Details
-
putRepl
-
put
-
put
-
getSplitter
private static de.danielnaber.jwordsplitter.GermanWordSplitter getSplitter() -
init
- Overrides:
initin classorg.languagetool.rules.spelling.hunspell.HunspellRule- Throws:
IOException
-
getId
- Overrides:
getIdin classorg.languagetool.rules.spelling.hunspell.HunspellRule
-
getCandidates
-
isProhibited
- Overrides:
isProhibitedin classorg.languagetool.rules.spelling.SpellingCheckRule
-
addIgnoreWords
- Overrides:
addIgnoreWordsin classorg.languagetool.rules.spelling.SpellingCheckRule
-
expandLine
-
getSuggestions
- Overrides:
getSuggestionsin classorg.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule- Throws:
IOException
-
getSpeller
@Nullable private static @Nullable org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller getSpeller(org.languagetool.Language language, org.languagetool.UserConfig userConfig, String languageVariantPlainTextDict) -
filterForLanguage
-
sortSuggestionByQuality
-
getFilteredSuggestions
-
isNoun
-
ignoreElative
-
isMisspelled
- Overrides:
isMisspelledin classorg.languagetool.rules.spelling.hunspell.HunspellRule
-
ignoreWord
- Overrides:
ignoreWordin classorg.languagetool.rules.spelling.SpellingCheckRule- Throws:
IOException
-
getAdditionalTopSuggestions
protected List<String> getAdditionalTopSuggestions(List<String> suggestions, String word) throws IOException - Overrides:
getAdditionalTopSuggestionsin classorg.languagetool.rules.spelling.SpellingCheckRule- Throws:
IOException
-
getPastTenseVerbSuggestion
-
baseForThirdPersonSingularVerb
- Throws:
IOException
-
getParticipleSuggestion
-
getParticipleForBaseform
- Throws:
IOException
-
getAbbreviationSuggestion
- Throws:
IOException
-
ignoreByHangingHyphen
- Throws:
IOException
-
isNeedingFugenS
-
getWordAfterEnumerationOrNull
-
ignoreCompoundWithIgnoredWord
- Throws:
IOException
-
isQuotedCompound
protected boolean isQuotedCompound(org.languagetool.AnalyzedSentence analyzedSentence, int idx, String token) - Overrides:
isQuotedCompoundin classorg.languagetool.rules.spelling.hunspell.HunspellRule
-
addProhibitedWords
-
isAcceptedWordFromLanguage
- Overrides:
isAcceptedWordFromLanguagein classorg.languagetool.rules.spelling.hunspell.HunspellRule
-