Class 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
    • 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​(java.util.ResourceBundle messages, org.languagetool.Language language, org.languagetool.UserConfig userConfig, java.util.List<org.languagetool.Language> altLanguages)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void filterForLanguage​(java.util.List<java.lang.String> suggestions)  
      protected java.util.List<java.lang.String> getAdditionalTopSuggestions​(java.util.List<java.lang.String> suggestions, java.lang.String word)  
      java.lang.String getId()  
      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 Detail

      • FrenchCompoundAwareHunspellRule

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

      • getId

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

        protected void filterForLanguage​(java.util.List<java.lang.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 java.util.List<java.lang.String> getAdditionalTopSuggestions​(java.util.List<java.lang.String> suggestions,
                                                                               java.lang.String word)
                                                                        throws java.io.IOException
        Overrides:
        getAdditionalTopSuggestions in class org.languagetool.rules.spelling.SpellingCheckRule
        Throws:
        java.io.IOException