|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectRule
PatternRule
public class PatternRule
A Rule that describes a language error as a simple pattern of words or of part-of-speech tags.
| Method Summary | |
|---|---|
void |
addSuggestionMatch(Match m)
|
String |
getDescription()
|
String |
getId()
|
String |
getMessage()
|
String |
getSubId()
|
boolean |
isWithComplexPhrase()
Used for testing rules: only one of the set can match. |
RuleMatch[] |
match(AnalyzedSentence text)
Check whether the given text matche this error rule, i.e. whether the text contains this error. |
void |
notComplexPhrase()
Reset complex status - used for testing. |
void |
reset()
If a rule keeps it state over more than the check of one sentence, this must be implemented so the internal state it reset. |
void |
setEndPositionCorrection(int endPositionCorrection)
|
void |
setMessage(String message)
|
void |
setStartPositionCorrection(int startPositionCorrection)
|
void |
setSubId(String subId)
|
String |
toPatternString()
Return the pattern as a string. |
String |
toString()
|
String |
toXML()
Return the pattern as an XML string. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public final String getId()
getId in class Rulepublic final String getDescription()
getDescription in class Rulepublic final String getSubId()
public final void setSubId(String subId)
public final String getMessage()
public final boolean isWithComplexPhrase()
public final void notComplexPhrase()
public final String toString()
toString in class Objectpublic final String toPatternString()
public final String toXML()
public final void setMessage(String message)
public final void setStartPositionCorrection(int startPositionCorrection)
public final void setEndPositionCorrection(int endPositionCorrection)
public final RuleMatch[] match(AnalyzedSentence text)
throws IOException
Rule
match in class Ruletext - a pre-analyzed sentence
IOExceptionpublic final void addSuggestionMatch(Match m)
public void reset()
Rule
reset in class Rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||