Class DifferentPunctuationRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.bitext.BitextRule
org.languagetool.rules.bitext.DifferentPunctuationRule

public class DifferentPunctuationRule extends BitextRule
Checks if the translation has the same ending punctuation as the source.
Since:
2.9
  • Constructor Details

    • DifferentPunctuationRule

      public DifferentPunctuationRule()
  • Method Details

    • getDescription

      public String getDescription()
      Description copied from class: Rule
      A short description of the error this rule can detect, usually in the language of the text that is checked.
      Specified by:
      getDescription in class Rule
    • getId

      public String getId()
      Description copied from class: Rule
      A 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. It's supposed to contain only the characters A-Z and the underscore.
      Specified by:
      getId in class Rule
    • getMessage

      public String getMessage()
      Specified by:
      getMessage in class BitextRule
    • match

      public RuleMatch[] match(AnalyzedSentence sourceText, AnalyzedSentence targetText) throws IOException
      Specified by:
      match in class BitextRule
      Throws:
      IOException