Class RemoteLanguageTool

java.lang.Object
org.languagetool.remote.RemoteLanguageTool

public class RemoteLanguageTool extends Object
Check a text using a remote LanguageTool server via HTTP or HTTPS. Our public HTTPS API and its restrictions are documented in our wiki.
Since:
3.4
  • Constructor Details

    • RemoteLanguageTool

      public RemoteLanguageTool(URL serverBaseUrl)
      Parameters:
      serverBaseUrl - for example https://languagetool.org/api (not ending in slash)
  • Method Details

    • check

      public RemoteResult check(String text, String langCode)
      Parameters:
      text - the text to be checked
      langCode - the language code like en or en-US - note that for some languages (like English) you need to specify the country code (like US or GB) to get spell checking
    • check

      public RemoteResult check(String text, CheckConfiguration config)
      Parameters:
      text - the text to be checked
    • getConfigurationInfo

      public RemoteConfigurationInfo getConfigurationInfo(String urlParameters)
    • getMaxTextLength

      public int getMaxTextLength()