public final class RulesApplier extends Object implements TypedChecker
Sentence object.| Constructor and Description |
|---|
RulesApplier(RulesTreesProvider rulesTreesProvider,
CogrooTagDictionary dictionary) |
| Modifier and Type | Method and Description |
|---|---|
List<Mistake> |
check(Sentence sentence)
Applies all active rules described in Rules.xml given a sentence properly tokenized, tagged, chunked
and shallow parsed.
|
void |
filterIgnoredRules(List<Mistake> rules) |
List<String> |
getCategories() |
String |
getIdPrefix()
Each checker should have IDs with a fixed prefix so CheckerComposite can
route the ignore message to the correct checker.
|
int |
getPriority()
Priority of this checker.
|
Collection<RuleDefinition> |
getRulesDefinition()
Returns the descriptions of the rules implemented by this checker.
|
void |
ignore(String ruleID)
The checker should ignore the rule with the given id.
|
void |
resetIgnored()
Reset all ignored rules
|
public static final String ID_PREFIX
public RulesApplier(RulesTreesProvider rulesTreesProvider, CogrooTagDictionary dictionary)
public List<Mistake> check(Sentence sentence)
check in interface GenericChecker<Sentence>sentence - a tokenized, tagged, chunked and shallow parsed sentence.dictionary - a word and tag dictionarypublic void ignore(String ruleID)
GenericCheckerignore in interface GenericChecker<Sentence>ruleID - the rule id to be ignoredpublic void resetIgnored()
GenericCheckerresetIgnored in interface GenericChecker<Sentence>public String getIdPrefix()
GenericCheckergetIdPrefix in interface GenericChecker<Sentence>public int getPriority()
GenericCheckergetPriority in interface GenericChecker<Sentence>public Collection<RuleDefinition> getRulesDefinition()
GenericCheckergetRulesDefinition in interface GenericChecker<Sentence>Copyright © 2012–2017 CoGrOO. All rights reserved.