Package org.languagetool
Class DynamicLanguage
- java.lang.Object
-
- org.languagetool.Language
-
- org.languagetool.DynamicLanguage
-
- Direct Known Subclasses:
DynamicHunspellLanguage,DynamicMorfologikLanguage
abstract class DynamicLanguage extends Language
-
-
Constructor Summary
Constructors Constructor Description DynamicLanguage(java.lang.String name, java.lang.String code, java.io.File dictPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCommonWordsPath()A file with commons words, either in the classpath or as a filename in the file system.java.lang.String[]getCountries()Get this language's country options , e.g.Contributor[]getMaintainers()Get the name(s) of the maintainer(s) for this language ornull.java.lang.StringgetName()Get this language's name in English, e.g.protected java.util.List<AbstractPatternRule>getPatternRules()Get the pattern rules as defined in the files returned byLanguage.getRuleFileNames().java.util.List<java.lang.String>getRuleFileNames()Get the location of the rule file(s) in a form like/org/languagetool/rules/de/grammar.xml, i.e.java.lang.StringgetShortCode()Get this language's character code, e.g.booleanisSpellcheckOnlyLanguage()Whether this language supports spell checking only and no advanced grammar and style checking.-
Methods inherited from class org.languagetool.Language
equals, equalsConsiderVariantsIfSpecified, getChunker, getDefaultDisabledRulesForVariant, getDefaultEnabledRulesForVariant, getDefaultLanguageVariant, getDisambiguationUnifier, getDisambiguationUnifierConfiguration, getDisambiguator, getIgnoredCharactersRegex, getLanguageModel, getLocale, getLocaleWithCountryAndVariant, getMaintainedState, getPostDisambiguationChunker, getPriorityForId, getRelevantLanguageModelCapableRules, getRelevantLanguageModelRules, getRelevantNeuralNetworkModels, getRelevantRules, getRelevantRulesGlobalConfig, getRelevantWord2VecModelRules, getSentenceTokenizer, getShortCodeWithCountryAndVariant, getSynthesizer, getTagger, getTranslatedName, getUnifier, getUnifierConfiguration, getVariant, getWord2VecModel, getWordTokenizer, hashCode, hasNGramFalseFriendRule, hasVariant, initLanguageModel, isExternal, isHiddenFromGui, isVariant, toString
-
-
-
-
Method Detail
-
getShortCode
public java.lang.String getShortCode()
Description copied from class:LanguageGet this language's character code, e.g.enfor 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:
getShortCodein classLanguage
-
getName
public java.lang.String getName()
Description copied from class:LanguageGet this language's name in English, e.g.EnglishorGerman (Germany).
-
getRuleFileNames
public java.util.List<java.lang.String> getRuleFileNames()
Description copied from class:LanguageGet 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:
getRuleFileNamesin classLanguage
-
getPatternRules
protected java.util.List<AbstractPatternRule> getPatternRules()
Description copied from class:LanguageGet the pattern rules as defined in the files returned byLanguage.getRuleFileNames().- Overrides:
getPatternRulesin classLanguage
-
getCommonWordsPath
public java.lang.String getCommonWordsPath()
Description copied from class:LanguageA file with commons words, either in the classpath or as a filename in the file system.- Overrides:
getCommonWordsPathin classLanguage
-
getCountries
public java.lang.String[] getCountries()
Description copied from class:LanguageGet this language's country options , e.g.US(as inen-US) orPL(as inpl-PL).- Specified by:
getCountriesin classLanguage- Returns:
- String[] - array of country options for the language.
-
getMaintainers
public Contributor[] getMaintainers()
Description copied from class:LanguageGet the name(s) of the maintainer(s) for this language ornull.- Specified by:
getMaintainersin classLanguage
-
isSpellcheckOnlyLanguage
public boolean isSpellcheckOnlyLanguage()
Description copied from class:LanguageWhether this language supports spell checking only and no advanced grammar and style checking.- Overrides:
isSpellcheckOnlyLanguagein classLanguage
-
-