org.languagetool.rules
Class GenericUnpairedBracketsRule

Object
  extended by Rule
      extended by GenericUnpairedBracketsRule
Direct Known Subclasses:
EnglishUnpairedBracketsRule, KhmerUnpairedBracketsRule, PolishUnpairedBracketsRule, RussianUnpairedBracketsRule

public class GenericUnpairedBracketsRule
extends Rule

Rule that finds unpaired quotes, brackets etc.

Author:
Marcin MiƂkowski

Field Summary
static Pattern NUMERALS
           
 
Constructor Summary
GenericUnpairedBracketsRule(ResourceBundle messages, Language language)
           
 
Method Summary
 String getDescription()
           
 String getId()
          An ASCII-only string used to identify the rule in e.g. configuration files.
 RuleMatch[] match(AnalyzedSentence text)
          Check whether the given text matches this error rule, i.e. whether the text contains this error.
 void reset()
          Reset the state information for the rule, including paragraph-level information.
 void uniqueMapInit()
           
 
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

NUMERALS

public static Pattern NUMERALS
Constructor Detail

GenericUnpairedBracketsRule

public GenericUnpairedBracketsRule(ResourceBundle messages,
                                   Language language)
Method Detail

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.

Specified by:
getId in class Rule

getDescription

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

uniqueMapInit

public void uniqueMapInit()

match

public final 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 final void reset()
Reset the state information for the rule, including paragraph-level information.

Specified by:
reset in class Rule


Copyright © 2005-2011 Daniel Naber