Class DynamicLanguage

java.lang.Object
org.languagetool.Language
org.languagetool.DynamicLanguage
Direct Known Subclasses:
DynamicHunspellLanguage, DynamicMorfologikLanguage

abstract class DynamicLanguage extends Language
  • Field Details

    • name

      protected final String name
    • code

      protected final String code
    • dictPath

      protected final File dictPath
  • Constructor Details

  • Method Details

    • getShortCode

      public String getShortCode()
      Description copied from class: Language
      Get this language's character code, e.g. en for English. For most languages this is a two-letter code according to ISO 639-1, but for those languages that don't have a two-letter code, a three-letter code according to ISO 639-2 is returned. The country parameter (e.g. "US"), if any, is not returned.
      Specified by:
      getShortCode in class Language
    • getName

      public String getName()
      Description copied from class: Language
      Get this language's name in English, e.g. English or German (Germany).
      Specified by:
      getName in class Language
      Returns:
      language name
    • getRuleFileNames

      public List<String> getRuleFileNames()
      Description copied from class: Language
      Get the location of the rule file(s) in a form like /org/languagetool/rules/de/grammar.xml, i.e. a path in the classpath. The files must exist or an exception will be thrown, unless the filename contains the string -test-.
      Overrides:
      getRuleFileNames in class Language
    • getPatternRules

      protected List<AbstractPatternRule> getPatternRules()
      Description copied from class: Language
      Get the pattern rules as defined in the files returned by Language.getRuleFileNames().
      Overrides:
      getPatternRules in class Language
    • getCommonWordsPath

      public String getCommonWordsPath()
      Description copied from class: Language
      A file with commons words, either in the classpath or as a filename in the file system.
      Overrides:
      getCommonWordsPath in class Language
    • getCountries

      public String[] getCountries()
      Description copied from class: Language
      Get this language's country options , e.g. US (as in en-US) or PL (as in pl-PL).
      Specified by:
      getCountries in class Language
      Returns:
      String[] - array of country options for the language.
    • getMaintainers

      public Contributor[] getMaintainers()
      Description copied from class: Language
      Get the name(s) of the maintainer(s) for this language or null.
      Specified by:
      getMaintainers in class Language
    • isSpellcheckOnlyLanguage

      public boolean isSpellcheckOnlyLanguage()
      Description copied from class: Language
      Whether this language supports spell checking only and no advanced grammar and style checking.
      Overrides:
      isSpellcheckOnlyLanguage in class Language