Package org.languagetool.language
Class SimpleGerman
java.lang.Object
org.languagetool.Language
org.languagetool.LanguageWithModel
org.languagetool.language.German
org.languagetool.language.GermanyGerman
org.languagetool.language.SimpleGerman
- All Implemented Interfaces:
AutoCloseable
Simple German (see e.g. Wikipedia)
that only support rules specific to this variant, not the other German rules.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates language specific disambiguator.getLanguageModel(File indexDir) Get the name(s) of the maintainer(s) for this language ornull.getName()Get this language's name in English, e.g.protected intReturns a priority for Rule or Category Id (default: 0).getRelevantLanguageModelCapableRules(ResourceBundle messages, LanguageModel languageModel, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) Get a list of rules that can optionally use aLanguageModel.getRelevantLanguageModelRules(ResourceBundle messages, LanguageModel languageModel, UserConfig userConfig) Get a list of rules that require aLanguageModel.getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) Get the rules classes that should run for texts in this language.Get the location of the rule file(s) in a form like/org/languagetool/rules/de/grammar.xml, i.e.Get this language's character code, e.g.booleanWhether this is a country variant of another language, i.e.Methods inherited from class org.languagetool.language.GermanyGerman
getCountries, getInstanceMethods inherited from class org.languagetool.language.German
createDefaultPostDisambiguationChunker, createDefaultSentenceTokenizer, createDefaultSpellingRule, createDefaultSynthesizer, createDefaultTagger, createDefaultWordTokenizer, filterRuleMatches, getClosingDoubleQuote, getClosingSingleQuote, getDefaultLanguageVariant, getDefaultSpellingRule, getMaintainedState, getMultitokenSpeller, getNonStrictCompoundSplitter, getOpeningDoubleQuote, getOpeningSingleQuote, getPriorityMap, getStrictCompoundTokenizer, hasMinMatchesRules, isAdvancedTypographyEnabled, prepareLineForSpeller, toAdvancedTypographyMethods inherited from class org.languagetool.LanguageWithModel
close, initLanguageModelMethods inherited from class org.languagetool.Language
adaptSuggestion, adjustMatch, createDefaultChunker, createDefaultJLanguageTool, equals, equalsConsiderVariantsIfSpecified, getChunker, getCommonWordsPath, getConsistencyRulePrefix, getDefaultDisabledRulesForVariant, getDefaultEnabledRulesForVariant, getDefaultRulePriorityForStyle, getDefaultSpellingRule, getDisambiguationUnifier, getDisambiguationUnifierConfiguration, getDisambiguator, getIgnoredCharactersRegex, getLocale, getLocaleWithCountryAndVariant, getPatternRules, getPostDisambiguationChunker, getRelevantRemoteRules, getRelevantRulesGlobalConfig, getRemoteEnhancedRules, getRulePriority, getSentenceTokenizer, getShortCodeWithCountryAndVariant, getSynthesizer, getTagger, getTranslatedName, getUnifier, getUnifierConfiguration, getVariant, getWordTokenizer, hashCode, hasNGramFalseFriendRule, hasVariant, isExternal, isHiddenFromGui, isSpellcheckOnlyLanguage, setChunker, setDisambiguator, setPostDisambiguationChunker, setSentenceTokenizer, setSynthesizer, setTagger, setWordTokenizer, toString
-
Constructor Details
-
SimpleGerman
public SimpleGerman()
-
-
Method Details
-
isVariant
public boolean isVariant()Description copied from class:LanguageWhether this is a country variant of another language, i.e. whether it doesn't directly extendLanguage, but a subclass ofLanguage.- Overrides:
isVariantin classGermanyGerman
-
getName
Description copied from class:LanguageGet this language's name in English, e.g.EnglishorGerman (Germany).- Overrides:
getNamein classGermanyGerman- Returns:
- language name
-
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.- Overrides:
getShortCodein classGerman
-
getMaintainers
Description copied from class:LanguageGet the name(s) of the maintainer(s) for this language ornull.- Overrides:
getMaintainersin classGerman
-
createDefaultDisambiguator
Description copied from class:LanguageCreates language specific disambiguator. This function will be called each time inLanguage.getDisambiguator()if disambiguator is not set.- Overrides:
createDefaultDisambiguatorin classGerman
-
getRelevantRules
public List<Rule> getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) throws IOException Description copied from class:LanguageGet the rules classes that should run for texts in this language.- Overrides:
getRelevantRulesin classGermanyGerman- Throws:
IOException
-
getLanguageModel
- Overrides:
getLanguageModelin classLanguageWithModel- Parameters:
indexDir- directory with a '3grams' sub directory which contains a Lucene index with 3gram occurrence counts- Returns:
- a LanguageModel or
nullif this language doesn't support one - Throws:
IOException
-
getRelevantLanguageModelRules
public List<Rule> getRelevantLanguageModelRules(ResourceBundle messages, LanguageModel languageModel, UserConfig userConfig) throws IOException Description copied from class:LanguageGet a list of rules that require aLanguageModel. Returns an empty list for languages that don't have such rules.- Overrides:
getRelevantLanguageModelRulesin classGerman- Throws:
IOException
-
getRelevantLanguageModelCapableRules
public List<Rule> getRelevantLanguageModelCapableRules(ResourceBundle messages, @Nullable LanguageModel languageModel, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) throws IOException Description copied from class:LanguageGet a list of rules that can optionally use aLanguageModel. Returns an empty list for languages that don't have such rules.- Overrides:
getRelevantLanguageModelCapableRulesin classGermanyGerman- Parameters:
languageModel- null if no language model is available- Throws:
IOException
-
getPriorityForId
Description copied from class:LanguageReturns a priority for Rule or Category Id (default: 0). Positive integers have higher priority. Negative integers have lower priority.- Overrides:
getPriorityForIdin classGerman
-
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 classGermanyGerman
-