org.cogroo.tools.checker.checkers
Class RepetitionChecker
java.lang.Object
org.cogroo.tools.checker.AbstractGenericChecker<Sentence>
org.cogroo.tools.checker.AbstractTypedChecker
org.cogroo.tools.checker.checkers.RepetitionChecker
- All Implemented Interfaces:
- GenericChecker<Sentence>, TypedChecker
public class RepetitionChecker
- extends AbstractTypedChecker
The RepetitionChecker class, looks in a sentence for repeated subsequent
words. Except when the first word is "se" meaning the subordinate
conjunction, followed by the word "se" meaning the personal pronoun.
Indicates false errors when dealing with contractions, for example: "em no (em + o)", "por pelo (por + o)"
Method Summary |
List<Mistake> |
check(Sentence sentence)
Check the sentence for errors. |
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. |
RepetitionChecker
public RepetitionChecker()
getIdPrefix
public String getIdPrefix()
- Description copied from interface:
GenericChecker
- Each checker should have IDs with a fixed prefix so CheckerComposite can
route the ignore message to the correct checker.
- Returns:
- the id prefix
check
public List<Mistake> check(Sentence sentence)
- Description copied from interface:
GenericChecker
- Check the sentence for errors.
- Parameters:
sentence
- the sentence
- Returns:
- errors
getPriority
public int getPriority()
- Description copied from interface:
GenericChecker
- Priority of this checker. The higher is the number the higher is its
priority
- Returns:
- the priority of this checker
Copyright © 2012-2013 CoGrOO. All Rights Reserved.