|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectRule
AbstractSimpleReplaceRule
public abstract class AbstractSimpleReplaceRule
A rule that matches words or phrases which should not be used and suggests
correct ones instead. Loads the relevant words from
rules/XX/replace.txt, where XX is a code of the language.
| Constructor Summary | |
|---|---|
AbstractSimpleReplaceRule(ResourceBundle messages)
|
|
| Method Summary | |
|---|---|
String |
getDescription()
|
String |
getEncoding()
|
abstract String |
getFileName()
|
String |
getId()
An ASCII-only string used to identify the rule in e.g. configuration files. |
Locale |
getLocale()
|
String |
getShort()
|
String |
getSuggestion()
|
boolean |
isCaseSensitive()
Indicates if the rule is case-sensitive. |
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 AbstractSimpleReplaceRule(ResourceBundle messages)
throws IOException
IOException| Method Detail |
|---|
public abstract String getFileName()
public String getEncoding()
public boolean isCaseSensitive()
true.
public Locale getLocale()
isCaseSensitive() is set to false.public String getId()
Rule
getId in class Rulepublic String getDescription()
getDescription in class Rulepublic String getSuggestion()
public String getShort()
public final 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 | |||||||||