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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.languagetool.rules.spelling.hunspell.HunspellRule

    FILE_EXTENSION, hunspellDict, needsInit, nonWordPattern, suggestionsOrderer

    Fields inherited from class org.languagetool.rules.spelling.SpellingCheckRule

    ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, wordListLoader

    Fields inherited from class org.languagetool.rules.Rule

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    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 Type
    Method
    Description
    protected void
     
    protected void
     
    protected List<String>
     
    protected void
     
    protected List<String>
     
     
    protected List<String>
     
     
     
    protected boolean
    ignoreWord(List<String> words, int idx)
     
    protected void
     
    protected boolean
    isAcceptedWordFromLanguage(org.languagetool.Language language, String word)
     
    boolean
     
    protected boolean
     
    protected boolean
    isQuotedCompound(org.languagetool.AnalyzedSentence analyzedSentence, int idx, String token)
     
    protected List<String>
    sortSuggestionByQuality(String misspelling, List<String> suggestions)
     

    Methods inherited from class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule

    getCandidates

    Methods inherited from class org.languagetool.rules.spelling.hunspell.HunspellRule

    getActiveChecks, getDescription, getDictFilenameInResources, getSentenceTextWithoutUrlsAndImmunizedTokens, match, tokenizeText

    Methods 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, startsWithIgnoredWord

    Methods 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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • GermanSpellerRule

      public GermanSpellerRule(ResourceBundle messages, German language)
    • 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

    • init

      protected void init() throws IOException
      Overrides:
      init in class org.languagetool.rules.spelling.hunspell.HunspellRule
      Throws:
      IOException
    • getId

      public String getId()
      Overrides:
      getId in class org.languagetool.rules.spelling.hunspell.HunspellRule
    • getCandidates

      public List<String> getCandidates(String word)
      Overrides:
      getCandidates in class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
    • isProhibited

      protected boolean isProhibited(String word)
      Overrides:
      isProhibited in class org.languagetool.rules.spelling.SpellingCheckRule
    • addIgnoreWords

      protected void addIgnoreWords(String origLine)
      Overrides:
      addIgnoreWords in class org.languagetool.rules.spelling.SpellingCheckRule
    • expandLine

      protected List<String> expandLine(String line)
      Overrides:
      expandLine in class org.languagetool.rules.spelling.SpellingCheckRule
    • getSuggestions

      public List<String> getSuggestions(String word) throws IOException
      Overrides:
      getSuggestions in class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
      Throws:
      IOException
    • filterForLanguage

      protected void filterForLanguage(List<String> suggestions)
      Specified by:
      filterForLanguage in class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
    • sortSuggestionByQuality

      protected List<String> sortSuggestionByQuality(String misspelling, List<String> suggestions)
      Overrides:
      sortSuggestionByQuality in class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
    • getFilteredSuggestions

      protected List<String> getFilteredSuggestions(List<String> wordsOrPhrases)
      Overrides:
      getFilteredSuggestions in class org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
    • isMisspelled

      public boolean isMisspelled(String word)
      Overrides:
      isMisspelled in class org.languagetool.rules.spelling.hunspell.HunspellRule
    • ignoreWord

      protected boolean ignoreWord(List<String> words, int idx) throws IOException
      Overrides:
      ignoreWord in class org.languagetool.rules.spelling.SpellingCheckRule
      Throws:
      IOException
    • getAdditionalTopSuggestions

      protected List<String> getAdditionalTopSuggestions(List<String> suggestions, String word) throws IOException
      Overrides:
      getAdditionalTopSuggestions in class org.languagetool.rules.spelling.SpellingCheckRule
      Throws:
      IOException
    • isQuotedCompound

      protected boolean isQuotedCompound(org.languagetool.AnalyzedSentence analyzedSentence, int idx, String token)
      Overrides:
      isQuotedCompound in class org.languagetool.rules.spelling.hunspell.HunspellRule
    • addProhibitedWords

      protected void addProhibitedWords(List<String> words)
      Overrides:
      addProhibitedWords in class org.languagetool.rules.spelling.SpellingCheckRule
    • isAcceptedWordFromLanguage

      protected boolean isAcceptedWordFromLanguage(org.languagetool.Language language, String word)
      Overrides:
      isAcceptedWordFromLanguage in class org.languagetool.rules.spelling.hunspell.HunspellRule