de.danielnaber.languagetool.rules.de
Class WordCoherencyRule
Object
Rule
GermanRule
WordCoherencyRule
public class WordCoherencyRule
- extends GermanRule
A rule that matches words for which two different spellings are used
throughout the document. Currently only implemented for German. Loads
the relevant word from rules/de/coherency.txt.
Note that this should not be used for language variations like
American English vs. British English or German "alte Rechtschreibung"
vs. "neue Rechtschreibung" -- that's the task of a spell checker.
- Author:
- Daniel Naber
|
Method Summary |
String |
getDescription()
|
String |
getId()
|
RuleMatch[] |
match(AnalyzedSentence text)
Check whether the given text matche this error rule, i.e. whether the
text contains this error. |
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. |
| Methods inherited from class Rule |
addRuleMatch, clearMatches, getCategory, getCorrectExamples, getIncorrectExamples, getMatches, getMatchesIndex, isDefaultOff, isInMatches, isInRemoved, isParagraphBackTrack, setAsDeleted, setCategory, setCorrectExamples, setDefaultOff, setIncorrectExamples, setParagraphBackTrack, supportsLanguage |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WordCoherencyRule
public WordCoherencyRule(ResourceBundle messages)
throws IOException
- Throws:
IOException
getId
public String getId()
- Specified by:
getId in class Rule
getDescription
public String getDescription()
- Specified by:
getDescription in class Rule
match
public RuleMatch[] match(AnalyzedSentence text)
- Description copied from class:
Rule
- Check whether the given text matche this error rule, i.e. whether the
text contains this error.
- Specified by:
match in class Rule
- Parameters:
text - a pre-analyzed sentence
- Returns:
- an array of RuleMatch object for each match.
reset
public void reset()
- Description copied from class:
Rule
- If a rule keeps it state over more than the check of one
sentence, this must be implemented so the internal state
it reset. It will be called before a new text is going
to be checked.
- Specified by:
reset in class Rule
Copyright © 2005-2007 Daniel Naber