public class GenericUnpairedBracketsRule extends TextLevelRule
| Modifier and Type | Field and Description |
|---|---|
protected Pattern |
numerals |
protected UnsyncStack<SymbolLocator> |
symbolStack |
| Constructor and Description |
|---|
GenericUnpairedBracketsRule(ResourceBundle messages)
Construct rule with a set of default start and end symbols:
[] () {} "" '' |
GenericUnpairedBracketsRule(ResourceBundle messages,
List<String> startSymbols,
List<String> endSymbols) |
GenericUnpairedBracketsRule(String ruleId,
ResourceBundle messages,
List<String> startSymbols,
List<String> endSymbols) |
| 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.
|
protected boolean |
isNoException(String token,
AnalyzedTokenReadings[] tokens,
int i,
int j,
boolean precSpace,
boolean follSpace)
Generic method to specify an exception.
|
RuleMatch[] |
match(List<AnalyzedSentence> sentences) |
protected void |
uniqueMapInit() |
match, resetaddExamplePair, getCategory, getCorrectExamples, getIncorrectExamples, getLocQualityIssueType, getUrl, isDefaultOff, isDictionaryBasedSpellingRule, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setIncorrectExamples, setLocQualityIssueType, setUrl, supportsLanguage, toRuleMatchArray, useInOfficeprotected final UnsyncStack<SymbolLocator> symbolStack
protected Pattern numerals
public GenericUnpairedBracketsRule(String ruleId, ResourceBundle messages, List<String> startSymbols, List<String> endSymbols)
public GenericUnpairedBracketsRule(ResourceBundle messages, List<String> startSymbols, List<String> endSymbols)
startSymbols - start symbols like "(" - note that the array must be of equal length as the next parameter
and the sequence of starting symbols must match exactly the sequence of ending symbols.endSymbols - end symbols like ")"public GenericUnpairedBracketsRule(ResourceBundle messages)
[] () {} "" ''public String getId()
RuleA-Z
and the underscore.public String getDescription()
RulegetDescription in class Ruleprotected void uniqueMapInit()
protected boolean isNoException(String token, AnalyzedTokenReadings[] tokens, int i, int j, boolean precSpace, boolean follSpace)
token - String tokentokens - Sentence tokensi - Current token indexprecSpace - is preceded with spacefollSpace - is followed with spacepublic final RuleMatch[] match(List<AnalyzedSentence> sentences)
match in class TextLevelRule