org.languagetool.rules.ca
Class AccentuacioReplaceRule

Object
  extended by Rule
      extended by AbstractSimpleReplaceRule
          extended by AccentuacioReplaceRule

public class AccentuacioReplaceRule
extends AbstractSimpleReplaceRule

A rule that matches words or phrases which should not be used and suggests correct ones instead. Catalan implementations for accentuation errors. This is basically the same as CastellanismesReplaceRule.java with a different error message. Loads the list of words from rules/ca/accentuacio.txt. TODO: Some of the entries are proper names (Greek gods, etc.), which aren't currently checked.

Author:
Jimmy O'Regan Based on pl/SimpleReplaceRule.java

Field Summary
static String CATALAN_ACCENTUACIO_REPLACE_RULE
           
 
Constructor Summary
AccentuacioReplaceRule(ResourceBundle messages)
           
 
Method Summary
 String getDescription()
           
 String getFileName()
           
 String getId()
          An ASCII-only string used to identify the rule in e.g. configuration files.
 Locale getLocale()
          locale used on case-conversion
 String getShort()
           
 String getSuggestion()
           
 boolean isCaseSensitive()
          use case-insensitive matching.
 
Methods inherited from class AbstractSimpleReplaceRule
getEncoding, match, 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
 

Field Detail

CATALAN_ACCENTUACIO_REPLACE_RULE

public static final String CATALAN_ACCENTUACIO_REPLACE_RULE
See Also:
Constant Field Values
Constructor Detail

AccentuacioReplaceRule

public AccentuacioReplaceRule(ResourceBundle messages)
                       throws IOException
Throws:
IOException
Method Detail

getFileName

public final String getFileName()
Specified by:
getFileName in class AbstractSimpleReplaceRule

getId

public final 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 AbstractSimpleReplaceRule

getDescription

public String getDescription()
Overrides:
getDescription in class AbstractSimpleReplaceRule

getShort

public String getShort()
Overrides:
getShort in class AbstractSimpleReplaceRule

getSuggestion

public String getSuggestion()
Overrides:
getSuggestion in class AbstractSimpleReplaceRule

isCaseSensitive

public boolean isCaseSensitive()
use case-insensitive matching.

Overrides:
isCaseSensitive in class AbstractSimpleReplaceRule
Returns:
true if the rule is case-sensitive, false otherwise.

getLocale

public Locale getLocale()
locale used on case-conversion

Overrides:
getLocale in class AbstractSimpleReplaceRule
Returns:
the locale used for case conversion when AbstractSimpleReplaceRule.isCaseSensitive() is set to false.


Copyright © 2005-2011 Daniel Naber