Class EnglishWrongWordInContextRule

java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.WrongWordInContextRule
org.languagetool.rules.en.EnglishWrongWordInContextRule

public class EnglishWrongWordInContextRule extends WrongWordInContextRule
  • Constructor Details

    • EnglishWrongWordInContextRule

      public EnglishWrongWordInContextRule(ResourceBundle messages, Language lang)
  • Method Details

    • getCategoryString

      protected String getCategoryString()
      Overrides:
      getCategoryString in class WrongWordInContextRule
    • 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.
      Overrides:
      getId in class WrongWordInContextRule
    • 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.
      Overrides:
      getDescription in class WrongWordInContextRule
    • getFilename

      protected String getFilename()
      Specified by:
      getFilename in class WrongWordInContextRule
    • getMessageString

      protected String getMessageString()
      Specified by:
      getMessageString in class WrongWordInContextRule
      Returns:
      a string like "Possible confusion of words: Did you mean <suggestion>$SUGGESTION</suggestion> instead of '$WRONGWORD'?"
    • getShortMessageString

      protected String getShortMessageString()
      Specified by:
      getShortMessageString in class WrongWordInContextRule
      Returns:
      a string like "Possible confusion of words"
    • getLongMessageString

      protected String getLongMessageString()
      Specified by:
      getLongMessageString in class WrongWordInContextRule
      Returns:
      a string like "Possible confusion of words: Did you mean <suggestion>$SUGGESTION</suggestion> (= $EXPLANATION_SUGGESTION) instead of '$WRONGWORD' (= $EXPLANATION_WRONGWORD)?"