de.danielnaber.languagetool.rules.es
Class ElwithFemRule
Object
Rule
SpanishRule
ElwithFemRule
public class ElwithFemRule
- extends SpanishRule
Check if the determiner (if any) preceding a feminine noun is "el". This
rule loads a list of words (feminine nouns starting with stressed ha- or a-)
from an external file. These words enforce the use of 'el' as determiner
instead of 'la' (also with 'un', 'algun' and 'ningun').
Sample
*la alma -> el alma
*la hambre -> el hambre
http://blog.lengua-e.com/2007/el-arma-determinante-masculino-ante-nombre-femenino/
http://tinyurl.com/m9uzte
- Author:
- Susana Sotelo Docio
based on English AvsAnRule rule
|
Method Summary |
String |
getDescription()
|
String |
getId()
|
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 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 |
ElwithFemRule
public ElwithFemRule(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 matches 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 its state over more than the check of one sentence, this
must be implemented so the internal state is reset. It will be called
before a new text is going to be checked.
- Specified by:
reset in class Rule
Copyright © 2005-2009 Daniel Naber