Package org.languagetool.rules.en
Class AbstractEnglishSpellerRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.spelling.SpellingCheckRule
org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
org.languagetool.rules.en.AbstractEnglishSpellerRule
- Direct Known Subclasses:
MorfologikAmericanSpellerRule,MorfologikAustralianSpellerRule,MorfologikBritishSpellerRule,MorfologikCanadianSpellerRule,MorfologikNewZealandSpellerRule,MorfologikSouthAfricanSpellerRule
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
conversionLocale, globalConfig, motherTongue, speller1, speller2, speller3Fields inherited from class org.languagetool.rules.spelling.SpellingCheckRule
CUSTOM_SPELLING_FILE, GLOBAL_SPELLING_FILE, HIGH_CONFIDENCE, ignoreWordsWithLength, language, languageModel, LANGUAGETOOLER, MAX_TOKEN_LENGTH, wordListLoader, wordsToBeIgnored -
Constructor Summary
ConstructorsConstructorDescriptionAbstractEnglishSpellerRule(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) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddHyphenSuggestions(String[] parts, List<SuggestedReplacement> topSuggestions) protected List<SuggestedReplacement>protected List<SuggestedReplacement>filterSuggestions(List<SuggestedReplacement> suggestions) protected List<SuggestedReplacement>getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) protected List<SuggestedReplacement>getOnlySuggestions(String word) getRuleMatches(String word, int startPos, AnalyzedSentence sentence, List<RuleMatch> ruleMatchesSoFar, int idx, AnalyzedTokenReadings[] tokens) protected TranslatorgetTranslator(GlobalConfig globalConfig) protected org.languagetool.rules.en.VariantInfoisValidInOtherVariant(String word) loadWordlist(String path, int column) match(AnalyzedSentence sentence) protected booleanMethods inherited from class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
getDescription, getFileName, getId, getSpellingSuggestions, ignoreWord, isMisspelled, isMisspelled, orderSuggestions, setCheckCompound, setCompoundRegex, setIgnoreTaggedWords, setLocale, tokenizingPatternMethods inherited from class org.languagetool.rules.spelling.SpellingCheckRule
acceptPhrases, addIgnoreTokens, addIgnoreWords, addProhibitedWords, addSuggestionsToRuleMatch, createWrongSplitMatch, expandLine, filterDupes, getAdditionalProhibitFileNames, getAdditionalSuggestions, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getProhibitFileName, getSpellingFileName, ignorePotentiallyMisspelledWord, ignoreToken, ignoreWord, init, isDictionaryBasedSpellingRule, isEMail, isIgnoredNoCase, isInIgnoredSet, isLatinScript, isProhibited, isUrl, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWordMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isGoalSpecific, isIncludedInErrorsCorrectedAllAtOnce, isIncludedInHiddenMatches, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncludedInHiddenMatches, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setPriority, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useDictionaryBasedFilterForMatches, useInOffice
-
Field Details
-
topSuggestions
-
topSuggestionsIgnoreCase
-
-
Constructor Details
-
AbstractEnglishSpellerRule
- Throws:
IOException
-
AbstractEnglishSpellerRule
public AbstractEnglishSpellerRule(ResourceBundle messages, Language language, UserConfig userConfig, List<Language> altLanguages) throws IOException - Throws:
IOException- Since:
- 4.4
-
AbstractEnglishSpellerRule
public AbstractEnglishSpellerRule(ResourceBundle messages, Language language, GlobalConfig globalConfig, UserConfig userConfig, List<Language> altLanguages, LanguageModel languageModel, Language motherTongue) throws IOException - Throws:
IOException- Since:
- 4.5 optional: language model for better suggestions
-
-
Method Details
-
getAdditionalSpellingFileNames
- Overrides:
getAdditionalSpellingFileNamesin classSpellingCheckRule
-
match
- Overrides:
matchin classMorfologikSpellerRule- Throws:
IOException
-
filterNoSuggestWords
- Overrides:
filterNoSuggestWordsin classSpellingCheckRule
-
loadWordlist
-
filterSuggestions
- Overrides:
filterSuggestionsin classSpellingCheckRule
-
getRuleMatches
protected List<RuleMatch> getRuleMatches(String word, int startPos, AnalyzedSentence sentence, List<RuleMatch> ruleMatchesSoFar, int idx, AnalyzedTokenReadings[] tokens) throws IOException - Overrides:
getRuleMatchesin classMorfologikSpellerRule- Throws:
IOException
-
isValidInOtherVariant
- Since:
- 4.5
-
getTopSuggestionsIgnoreCase
-
getTopSuggestions
-
getAdditionalTopSuggestions
protected List<SuggestedReplacement> getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) throws IOException - Overrides:
getAdditionalTopSuggestionsin classSpellingCheckRule- Throws:
IOException- Since:
- 2.7
-
addHyphenSuggestions
protected void addHyphenSuggestions(String[] parts, List<SuggestedReplacement> topSuggestions) throws IOException - Overrides:
addHyphenSuggestionsin classMorfologikSpellerRule- Throws:
IOException
-
getTranslator
- Overrides:
getTranslatorin classMorfologikSpellerRule
-
tokenizeNewWords
protected boolean tokenizeNewWords()- Overrides:
tokenizeNewWordsin classSpellingCheckRule
-
getOnlySuggestions
- Overrides:
getOnlySuggestionsin classSpellingCheckRule
-