org.languagetool.rules.uk
Class SimpleReplaceRule

java.lang.Object
  extended by org.languagetool.rules.Rule
      extended by org.languagetool.rules.uk.SimpleReplaceRule

public class SimpleReplaceRule
extends Rule

A rule that matches words which should not be used and suggests correct ones instead. Ukrainian implementations. Loads the relevant words from rules/uk/replace.txt.

Author:
Andriy Rysin

Field Summary
 
Fields inherited from class org.languagetool.rules.Rule
messages
 
Constructor Summary
SimpleReplaceRule(ResourceBundle messages)
           
 
Method Summary
 String getDescription()
           
 String getEncoding()
           
 String getFileName()
           
 String getId()
           
 Locale getLocale()
           
 String getShort()
           
 String getSuggestion()
           
 boolean isCaseSensitive()
          Indicates if the rule is case-sensitive.
 RuleMatch[] match(AnalyzedSentence text)
           
 void reset()
           
 
Methods inherited from class org.languagetool.rules.Rule
addRuleMatch, clearMatches, getCategory, getCorrectExamples, getIncorrectExamples, getLocQualityIssueType, getMatches, getMatchesIndex, getUrl, isDefaultOff, isInMatches, isInRemoved, isParagraphBackTrack, isSpellingRule, setAsDeleted, setCategory, setCorrectExamples, setDefaultOff, setIncorrectExamples, setLocQualityIssueType, setParagraphBackTrack, setUrl, supportsLanguage, toRuleMatchArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleReplaceRule

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

getFileName

public final String getFileName()

getId

public final String getId()
Specified by:
getId in class Rule

getDescription

public String getDescription()
Specified by:
getDescription in class Rule

getShort

public String getShort()

getSuggestion

public String getSuggestion()

isCaseSensitive

public boolean isCaseSensitive()
Indicates if the rule is case-sensitive.

Returns:
true if the rule is case-sensitive, false otherwise.

getLocale

public Locale getLocale()
Returns:
the locale used for case conversion when isCaseSensitive() is set to false.

getEncoding

public String getEncoding()

match

public final RuleMatch[] match(AnalyzedSentence text)
Specified by:
match in class Rule

reset

public void reset()
Specified by:
reset in class Rule


Copyright © 2013. All Rights Reserved.