|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectRule
WordRepeatBeginningRule
public class WordRepeatBeginningRule
Check if three successive sentences begin with the same word, e.g. "I am Max. I am living in Germany. I like ice cream.", and if two successive sentences begin with the same adverb, e.g. "Furthermore, he is ill. Furthermore, he likes her."
| Constructor Summary | |
|---|---|
WordRepeatBeginningRule(ResourceBundle messages,
Language language)
|
|
| Method Summary | |
|---|---|
String |
getDescription()
|
String |
getId()
An ASCII-only string used to identify the rule in e.g. configuration files. |
boolean |
isAdverb(String token)
|
boolean |
isException(String token)
|
RuleMatch[] |
match(AnalyzedSentence text)
Check whether the given text matches this error rule, i.e. whether the text contains this error. |
void |
reset()
If a rule keeps its state over more than the check of one sentence, this must be implemented so the internal state is reset. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WordRepeatBeginningRule(ResourceBundle messages,
Language language)
| Method Detail |
|---|
public String getId()
Rule
getId in class Rulepublic String getDescription()
getDescription in class Rulepublic boolean isAdverb(String token)
public boolean isException(String token)
public RuleMatch[] match(AnalyzedSentence text)
Rule
match in class Ruletext - a pre-analyzed sentence
public void reset()
Rule
reset in class Rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||