public abstract class AbstractEnglishSpellerRule extends MorfologikSpellerRule
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,List<String>> |
topSuggestions |
protected Map<String,List<String>> |
topSuggestionsIgnoreCase |
conversionLocale, globalConfig, motherTongue, speller1, speller2, speller3CUSTOM_SPELLING_FILE, GLOBAL_SPELLING_FILE, HIGH_CONFIDENCE, ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, MAX_TOKEN_LENGTH, wordListLoader, wordsToBeIgnored| Constructor and Description |
|---|
AbstractEnglishSpellerRule(ResourceBundle messages,
Language language) |
AbstractEnglishSpellerRule(ResourceBundle messages,
Language language,
GlobalConfig globalConfig,
UserConfig userConfig,
List<Language> altLanguages,
LanguageModel languageModel,
Language motherTongue) |
AbstractEnglishSpellerRule(ResourceBundle messages,
Language language,
UserConfig userConfig,
List<Language> altLanguages) |
| Modifier and Type | Method and Description |
|---|---|
protected List<SuggestedReplacement> |
filterNoSuggestWords(List<SuggestedReplacement> l) |
protected List<SuggestedReplacement> |
filterSuggestions(List<SuggestedReplacement> suggestions)
Remove prohibited words from suggestions.
|
protected List<SuggestedReplacement> |
getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions,
String word)
Get additional suggestions added before other suggestions (note the rule may choose to
re-order the suggestions anyway).
|
protected List<SuggestedReplacement> |
getOnlySuggestions(String word)
Get suggestions that will replace all other suggestions.
|
protected List<RuleMatch> |
getRuleMatches(String word,
int startPos,
AnalyzedSentence sentence,
List<RuleMatch> ruleMatchesSoFar,
int idx,
AnalyzedTokenReadings[] tokens) |
protected static Map<String,List<String>> |
getTopSuggestions() |
protected static Map<String,List<String>> |
getTopSuggestionsIgnoreCase() |
protected Translator |
getTranslator(GlobalConfig globalConfig) |
protected org.languagetool.rules.en.VariantInfo |
isValidInOtherVariant(String word) |
protected static Map<String,String> |
loadWordlist(String path,
int column) |
RuleMatch[] |
match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
protected boolean |
tokenizeNewWords() |
getDescription, getFileName, getId, getSpellingSuggestions, ignoreWord, isEmoji, isMisspelled, isMisspelled, orderSuggestions, setCheckCompound, setCompoundRegex, setIgnoreTaggedWords, setLocale, tokenizingPatternacceptPhrases, addIgnoreTokens, addIgnoreWords, addProhibitedWords, addSuggestionsToRuleMatch, createWrongSplitMatch, expandLine, filterDupes, getAdditionalProhibitFileNames, getAdditionalSpellingFileNames, getAdditionalSuggestions, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getProhibitFileName, getSpellingFileName, ignorePotentiallyMisspelledWord, ignoreToken, ignoreWord, init, isDictionaryBasedSpellingRule, isEMail, isIgnoredNoCase, isInIgnoredSet, isLatinScript, isProhibited, isUrl, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWordaddExamplePair, 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 AbstractEnglishSpellerRule(ResourceBundle messages, Language language) throws IOException
IOExceptionpublic AbstractEnglishSpellerRule(ResourceBundle messages, Language language, UserConfig userConfig, List<Language> altLanguages) throws IOException
IOExceptionpublic AbstractEnglishSpellerRule(ResourceBundle messages, Language language, GlobalConfig globalConfig, UserConfig userConfig, List<Language> altLanguages, LanguageModel languageModel, Language motherTongue) throws IOException
IOExceptionpublic RuleMatch[] match(AnalyzedSentence sentence) throws IOException
Rulematch in class MorfologikSpellerRulesentence - a pre-analyzed sentenceRuleMatch objectsIOExceptionprotected List<SuggestedReplacement> filterNoSuggestWords(List<SuggestedReplacement> l)
filterNoSuggestWords in class SpellingCheckRuleprotected List<SuggestedReplacement> filterSuggestions(List<SuggestedReplacement> suggestions)
SpellingCheckRulefilterSuggestions in class SpellingCheckRuleprotected List<RuleMatch> getRuleMatches(String word, int startPos, AnalyzedSentence sentence, List<RuleMatch> ruleMatchesSoFar, int idx, AnalyzedTokenReadings[] tokens) throws IOException
getRuleMatches in class MorfologikSpellerRuleIOException@Nullable protected org.languagetool.rules.en.VariantInfo isValidInOtherVariant(String word)
protected List<SuggestedReplacement> getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) throws IOException
SpellingCheckRulegetAdditionalTopSuggestions in class SpellingCheckRuleIOExceptionprotected Translator getTranslator(GlobalConfig globalConfig)
getTranslator in class MorfologikSpellerRuleprotected boolean tokenizeNewWords()
tokenizeNewWords in class SpellingCheckRuleprotected List<SuggestedReplacement> getOnlySuggestions(String word)
SpellingCheckRulegetOnlySuggestions in class SpellingCheckRule