Class FrenchCompoundAwareHunspellRule

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.fr.FrenchCompoundAwareHunspellRule

public class FrenchCompoundAwareHunspellRule extends org.languagetool.rules.spelling.hunspell.CompoundAwareHunspellRule
A French spell checker that uses hunspell for checking but Morfologik for suggestions (for performance reasons).
Since:
4.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static class 
     
  • Field Summary

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

    FILE_EXTENSION, hunspellDict, needsInit, nonWordPattern, RULE_ID, 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
    FrenchCompoundAwareHunspellRule(ResourceBundle messages, org.languagetool.Language language, org.languagetool.UserConfig userConfig, List<org.languagetool.Language> altLanguages)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected List<String>
     
     
    private static @Nullable org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller
    getSpeller(org.languagetool.Language language, org.languagetool.UserConfig userConfig)
     

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

    getCandidates, getCandidates, getFilteredSuggestions, getSuggestions, sortSuggestionByQuality

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

    getActiveChecks, getDescription, getDictFilenameInResources, getSentenceTextWithoutUrlsAndImmunizedTokens, init, isAcceptedWordFromLanguage, isMisspelled, isQuotedCompound, match, tokenizeText

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

    acceptedInAlternativeLanguage, acceptPhrases, addIgnoreTokens, addIgnoreWords, addProhibitedWords, addSuggestionsToRuleMatch, createWrongSplitMatch, expandLine, filterDupes, filterSuggestions, getAdditionalProhibitFileNames, getAdditionalSpellingFileNames, getAdditionalSuggestions, getAlternativeLangSpellingRules, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getProhibitFileName, getSpellingFileName, ignoreToken, ignoreWord, ignoreWord, isDictionaryBasedSpellingRule, isEMail, isProhibited, 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 java.lang.Object

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

    • FrenchCompoundAwareHunspellRule

      public FrenchCompoundAwareHunspellRule(ResourceBundle messages, org.languagetool.Language language, org.languagetool.UserConfig userConfig, List<org.languagetool.Language> altLanguages)
  • Method Details

    • getId

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

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

      @Nullable private static @Nullable org.languagetool.rules.spelling.morfologik.MorfologikMultiSpeller getSpeller(org.languagetool.Language language, org.languagetool.UserConfig userConfig)
    • getAdditionalTopSuggestions

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