Class RemoteRuleMatch

java.lang.Object
org.languagetool.remote.RemoteRuleMatch

public class RemoteRuleMatch extends Object
A potential error as returned by the HTTP API of LanguageTool.
Since:
3.4
  • Method Details

    • getRuleId

      public String getRuleId()
      Unique (per language) identifier for the error.
    • getRuleDescription

      public String getRuleDescription()
      Description of the rule.
    • getRuleSubId

      public Optional<String> getRuleSubId()
      Optional sub id (rule groups have a sub id for each rule).
    • getMessage

      public String getMessage()
      A text describing the error to the user.
    • getShortMessage

      public Optional<String> getShortMessage()
      Optional short message describing the error.
    • getReplacements

      public Optional<List<String>> getReplacements()
      Potential corrections for the error. Note that corrections might be wrong and they are not necessarily ordered by quality.
    • getContext

      public String getContext()
      The error in its context. See getContextOffset() and getErrorLength() to get the exact position.
    • getContextOffset

      public int getContextOffset()
      The character position of the error start inside the result of getContext().
    • getErrorOffset

      public int getErrorOffset()
      The character position where the error starts.
    • getErrorLength

      public int getErrorLength()
      The length of the error in characters.
    • getUrl

      public Optional<String> getUrl()
      URL with a more detailed explanation of the error.
    • getCategory

      public Optional<String> getCategory()
      The error's category.
    • getCategoryId

      public Optional<String> getCategoryId()
      The id of the error's category.
    • getLocQualityIssueType

      public Optional<String> getLocQualityIssueType()
    • toString

      public String toString()
      Overrides:
      toString in class Object