public class LongSentenceRule extends Rule
| Constructor and Description |
|---|
LongSentenceRule(ResourceBundle messages)
Creates a rule with the default maximum sentence length (40 words).
|
LongSentenceRule(ResourceBundle messages,
int maxSentenceLength) |
| 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.
|
RuleMatch[] |
match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
void |
reset()
If a rule keeps its state over more than the check of one sentence, this
must be implemented so the internal state is reset.
|
addExamplePair, getCategory, getCorrectExamples, getIncorrectExamples, getLocQualityIssueType, getUrl, isDefaultOff, isDictionaryBasedSpellingRule, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setIncorrectExamples, setLocQualityIssueType, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic LongSentenceRule(ResourceBundle messages, int maxSentenceLength)
maxSentenceLength - the maximum sentence length that does not yet trigger a matchpublic LongSentenceRule(ResourceBundle messages)
public String getDescription()
RulegetDescription in class Rulepublic String getId()
RuleA-Z
and the underscore.public RuleMatch[] match(AnalyzedSentence sentence) throws IOException
Rulematch in class Rulesentence - a pre-analyzed sentenceRuleMatch objectsIOException