public abstract class TextLevelRule extends Rule
Constructor and Description |
---|
TextLevelRule() |
TextLevelRule(ResourceBundle messages)
Called by rules that require a translation of their messages.
|
Modifier and Type | Method and Description |
---|---|
int |
estimateContextForSureMatch()
A number that estimates how many words there must be after a match before we
can be (relatively) sure the match is valid.
|
RuleMatch[] |
match(AnalyzedSentence sentence)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
abstract RuleMatch[] |
match(List<AnalyzedSentence> sentences)
Deprecated.
use
match(List, AnnotatedText) instead |
RuleMatch[] |
match(List<AnalyzedSentence> sentences,
AnnotatedText annotatedText) |
abstract int |
minToCheckParagraph()
Gives back the minimum number of paragraphs to check to give back a correct result.
|
addExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDescription, getDistanceTokens, getErrorTriggeringExamples, getFullId, getId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasConfigurableValue, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, 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, useInOffice
public TextLevelRule()
public TextLevelRule(ResourceBundle messages)
public RuleMatch[] match(List<AnalyzedSentence> sentences, AnnotatedText annotatedText) throws IOException
IOException
public abstract RuleMatch[] match(List<AnalyzedSentence> sentences) throws IOException
match(List, AnnotatedText)
insteadIOException
public int estimateContextForSureMatch()
Rule
-1
when the sentence needs to end to be sure there's a match.estimateContextForSureMatch
in class Rule
public final RuleMatch[] match(AnalyzedSentence sentence) throws IOException
Rule
match
in class Rule
sentence
- a pre-analyzed sentenceRuleMatch
objectsIOException
public abstract int minToCheckParagraph()