public class RegexPatternRule extends AbstractPatternRule implements RuleMatcher
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_SENT_LENGTH |
antiPatterns, endPositionCorrection, filter, filterArgs, language, message, patternTokens, sentStart, sourceFile, startPositionCorrection, subId, suggestionMatches, suggestionMatchesOutMsg, suggestionsOutMsg, testUnification, type| Constructor and Description |
|---|
RegexPatternRule(String id,
String description,
String message,
String shortMessage,
String suggestionsOutMsg,
Language language,
Pattern regex,
int regexpMark) |
| 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.
|
Pattern |
getPattern() |
RuleMatch[] |
match(AnalyzedSentence sentenceObj)
Check whether the given sentence matches this error rule, i.e. whether it
contains the error detected by this rule.
|
String |
toString() |
addSuggestionMatch, addSuggestionMatchOutMsg, getAntiPatterns, getDescription, getEndPositionCorrection, getFilter, getFilterArguments, getFullId, getId, getLanguage, getMessage, getPatternRuleId, getPatternTokens, getSourceFile, getStartPositionCorrection, getSubId, getSuggestionsOutMsg, getType, getXmlLineNumber, isAdjustSuggestionCase, isGetUnified, isGroupsOrUnification, isSentStart, isTestUnification, setAdjustSuggestionCase, setAntiPatterns, setEndPositionCorrection, setFilter, setFilterArguments, setMessage, setStartPositionCorrection, setSubId, setType, setXmlLineNumber, supportsLanguageaddExamplePair, addTags, addToneTags, cacheAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDistanceTokens, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, 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, toRuleMatchArray, useInOfficepublic static final int MAX_SENT_LENGTH
public Pattern getPattern()
public RuleMatch[] match(AnalyzedSentence sentenceObj) throws IOException
Rulematch in interface RuleMatchermatch in class AbstractPatternRulesentenceObj - a pre-analyzed sentenceRuleMatch objectsIOExceptionpublic int estimateContextForSureMatch()
Rule-1 when the sentence needs to end to be sure there's a match.estimateContextForSureMatch in class Rulepublic String toString()
toString in class AbstractPatternRule