public abstract class CompoundAwareHunspellRule extends HunspellRule
FILE_EXTENSION, hunspell, nonWordPattern, RULE_IDCUSTOM_SPELLING_FILE, GLOBAL_SPELLING_FILE, HIGH_CONFIDENCE, ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, MAX_TOKEN_LENGTH, wordListLoader, wordsToBeIgnored| Constructor and Description |
|---|
CompoundAwareHunspellRule(ResourceBundle messages,
Language language,
CompoundWordTokenizer compoundSplitter,
MorfologikMultiSpeller morfoSpeller,
UserConfig userConfig) |
CompoundAwareHunspellRule(ResourceBundle messages,
Language language,
CompoundWordTokenizer compoundSplitter,
MorfologikMultiSpeller morfoSpeller,
UserConfig userConfig,
List<Language> altLanguages) |
CompoundAwareHunspellRule(ResourceBundle messages,
Language language,
CompoundWordTokenizer compoundSplitter,
MorfologikMultiSpeller morfoSpeller,
UserConfig userConfig,
List<Language> altLanguages,
LanguageModel languageModel) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
filterForLanguage(List<String> suggestions) |
protected List<String> |
getCandidates(List<String> parts) |
protected List<String> |
getCandidates(String word)
Find potential corrections - it's okay if some of these are not valid words,
this list will be filtered against the spellchecker before being returned to the user.
|
protected List<String> |
getFilteredSuggestions(List<String> wordsOrPhrases) |
protected static List<String> |
getSpellingFilePaths(String langCode) |
protected static List<InputStream> |
getStreams(List<String> paths) |
List<String> |
getSuggestions(String word)
As a hunspell-based approach is too slow, we use Morfologik to create suggestions.
|
protected List<String> |
sortSuggestionByQuality(String misspelling,
List<String> suggestions) |
acceptSuggestion, ensureInitialized, getActiveChecks, getDescription, getDictFilenameInResources, getId, getSentenceTextWithoutUrlsAndImmunizedTokens, init, isInIgnoredSet, isMisspelled, isQuotedCompound, match, tokenizeTextacceptPhrases, addIgnoreTokens, addIgnoreWords, addProhibitedWords, addSuggestionsToRuleMatch, createWrongSplitMatch, expandLine, filterDupes, filterNoSuggestWords, filterSuggestions, getAdditionalProhibitFileNames, getAdditionalSpellingFileNames, getAdditionalSuggestions, getAdditionalTopSuggestions, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getOnlySuggestions, getProhibitFileName, getSpellingFileName, ignorePotentiallyMisspelledWord, ignoreToken, ignoreWord, ignoreWord, isDictionaryBasedSpellingRule, isEMail, isIgnoredNoCase, isLatinScript, isProhibited, isUrl, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWord, tokenizeNewWordsaddExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasConfigurableValue, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isGoalSpecific, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic CompoundAwareHunspellRule(ResourceBundle messages, Language language, CompoundWordTokenizer compoundSplitter, MorfologikMultiSpeller morfoSpeller, UserConfig userConfig)
public CompoundAwareHunspellRule(ResourceBundle messages, Language language, CompoundWordTokenizer compoundSplitter, MorfologikMultiSpeller morfoSpeller, UserConfig userConfig, List<Language> altLanguages)
public CompoundAwareHunspellRule(ResourceBundle messages, Language language, CompoundWordTokenizer compoundSplitter, MorfologikMultiSpeller morfoSpeller, UserConfig userConfig, List<Language> altLanguages, LanguageModel languageModel)
@NotNull protected static List<InputStream> getStreams(List<String> paths)
public List<String> getSuggestions(String word) throws IOException
getSuggestions in class HunspellRuleIOExceptionprotected List<String> getCandidates(String word)
protected List<String> sortSuggestionByQuality(String misspelling, List<String> suggestions)
sortSuggestionByQuality in class HunspellRule