public class HunspellRule extends SpellingCheckRule
| Modifier and Type | Field and Description |
|---|---|
protected Hunspell.Dictionary |
hunspellDict |
protected boolean |
needsInit |
static String |
RULE_ID |
language, LANGUAGETOOL, LANGUAGETOOL_FX| Constructor and Description |
|---|
HunspellRule(ResourceBundle messages,
Language language) |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
A short description of the error this rule can detect, usually in the language of the text
that is checked.
|
String |
getId()
A string used to identify the rule in e.g. configuration files.
|
List<String> |
getSuggestions(String word) |
protected void |
init() |
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 String[] |
tokenizeText(String sentence) |
addIgnoreTokens, addIgnoreWords, expandLine, filterSuggestions, getAdditionalSuggestions, getAdditionalTopSuggestions, getIgnoreFileName, getProhibitFileName, getSpellingFileName, ignoreToken, ignoreWord, ignoreWord, isConvertsCase, isDictionaryBasedSpellingRule, isProhibited, isUrl, reset, setConsiderIgnoreWords, setConvertsCaseaddExamplePair, getCategory, getCorrectExamples, getIncorrectExamples, getLocQualityIssueType, getUrl, isDefaultOff, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setIncorrectExamples, setLocQualityIssueType, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic static final String RULE_ID
protected boolean needsInit
protected Hunspell.Dictionary hunspellDict
public HunspellRule(ResourceBundle messages, Language language)
public String getId()
RuleA-Z
and the underscore.getId in class SpellingCheckRulepublic String getDescription()
RulegetDescription in class SpellingCheckRulepublic RuleMatch[] match(AnalyzedSentence sentence) throws IOException
Rulematch in class SpellingCheckRulesentence - a pre-analyzed sentenceRuleMatch objectsIOExceptionpublic List<String> getSuggestions(String word) throws IOException
IOExceptionprotected void init()
throws IOException
init in class SpellingCheckRuleIOException