|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cogroo.tools.checker.rules.applier.RulesApplier
public final class RulesApplier
Applies error rules to a Sentence
object.
Constructor Summary | |
---|---|
RulesApplier(RulesTreesProvider rulesTreesProvider,
CogrooTagDictionary dictionary)
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RulesApplier(RulesTreesProvider rulesTreesProvider, CogrooTagDictionary dictionary)
Method Detail |
---|
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 dictionary
public void ignore(String ruleID)
GenericChecker
ignore
in interface GenericChecker<Sentence>
ruleID
- the rule id to be ignoredpublic void resetIgnored()
GenericChecker
resetIgnored
in interface GenericChecker<Sentence>
public void filterIgnoredRules(List<Mistake> rules)
public List<String> getCategories()
public String getIdPrefix()
GenericChecker
getIdPrefix
in interface GenericChecker<Sentence>
public int getPriority()
GenericChecker
getPriority
in interface GenericChecker<Sentence>
public Collection<RuleDefinition> getRulesDefinition()
GenericChecker
getRulesDefinition
in interface GenericChecker<Sentence>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |