org.languagetool.rules.de
Class GermanWordRepeatRule
Object
Rule
WordRepeatRule
GermanWordRepeatRule
public class GermanWordRepeatRule
- extends WordRepeatRule
Check if a word is repeated twice, taking into account an exception
for German where e.g. "..., die die ..." is often okay.
- Author:
- Daniel Naber
|
Method Summary |
String |
getId()
An ASCII-only string used to identify the rule in e.g. configuration files. |
boolean |
ignore(AnalyzedTokenReadings[] tokens,
int position)
Implement this method to return true if there's
a potential word repetition at the current position should be ignored,
i.e. if no error should be created. |
| 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 |
GermanWordRepeatRule
public GermanWordRepeatRule(ResourceBundle messages,
Language language)
getId
public String getId()
- Description copied from class:
Rule
- An ASCII-only string used to identify the rule in e.g. configuration files.
This string is supposed to be unique and to stay the same in all upcoming
versions of LanguageTool.
- Overrides:
getId in class WordRepeatRule
ignore
public boolean ignore(AnalyzedTokenReadings[] tokens,
int position)
- Description copied from class:
WordRepeatRule
- Implement this method to return
true if there's
a potential word repetition at the current position should be ignored,
i.e. if no error should be created.
- Overrides:
ignore in class WordRepeatRule
- Parameters:
tokens - the tokens of the sentence currently being checkedposition - the current position in the tokens
- Returns:
- this implementation always returns false
Copyright © 2005-2011 Daniel Naber