public class GenericUnpairedQuotesRule extends TextLevelRule
| Modifier and Type | Class and Description |
|---|---|
protected class |
GenericUnpairedQuotesRule.SymbolLocator |
| Constructor and Description |
|---|
GenericUnpairedQuotesRule(ResourceBundle messages)
Construct rule with a set of default start and end symbols:
“” "" ‘’ '' |
GenericUnpairedQuotesRule(ResourceBundle messages,
List<String> startSymbols,
List<String> endSymbols) |
GenericUnpairedQuotesRule(String ruleId,
ResourceBundle messages,
List<String> startSymbols,
List<String> endSymbols) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
findCorrespondingSymbol(String symbol) |
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 |
isNotBeginningApostrophe(AnalyzedTokenReadings[] tokens,
int i) |
protected boolean |
isNotEndingApostrophe(AnalyzedTokenReadings[] tokens,
int i) |
RuleMatch[] |
match(List<AnalyzedSentence> sentences) |
int |
minToCheckParagraph()
Gives back the minimum number of paragraphs to check to give back a correct result.
|
estimateContextForSureMatch, match, matchaddExamplePair, addTags, addToneTags, cacheAntiPatterns, getAntiPatterns, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isIncludedInHiddenMatches, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncludedInHiddenMatches, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setPriority, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOfficepublic GenericUnpairedQuotesRule(String ruleId, ResourceBundle messages, List<String> startSymbols, List<String> endSymbols)
public GenericUnpairedQuotesRule(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 GenericUnpairedQuotesRule(ResourceBundle messages)
“” "" ‘’ ''public String getId()
RuleA-Z
and the underscore.public String getDescription()
RulegetDescription in class Rulepublic final RuleMatch[] match(List<AnalyzedSentence> sentences)
match in class TextLevelRuleprotected boolean isNotBeginningApostrophe(AnalyzedTokenReadings[] tokens, int i)
protected boolean isNotEndingApostrophe(AnalyzedTokenReadings[] tokens, int i)
public int minToCheckParagraph()
TextLevelRuleminToCheckParagraph in class TextLevelRule