public class SimpleGerman extends GermanyGerman
INSTANCE
Constructor and Description |
---|
SimpleGerman() |
Modifier and Type | Method and Description |
---|---|
Disambiguator |
createDefaultDisambiguator()
Creates language specific disambiguator.
|
LanguageModel |
getLanguageModel(File indexDir) |
Contributor[] |
getMaintainers()
Get the name(s) of the maintainer(s) for this language or
null . |
String |
getName()
Get this language's name in English, e.g.
|
protected int |
getPriorityForId(String id)
Returns a priority for Rule or Category Id (default: 0).
|
List<Rule> |
getRelevantLanguageModelCapableRules(ResourceBundle messages,
LanguageModel languageModel,
GlobalConfig globalConfig,
UserConfig userConfig,
Language motherTongue,
List<Language> altLanguages)
Get a list of rules that can optionally use a
LanguageModel . |
List<Rule> |
getRelevantLanguageModelRules(ResourceBundle messages,
LanguageModel languageModel,
UserConfig userConfig)
Get a list of rules that require a
LanguageModel . |
List<Rule> |
getRelevantRules(ResourceBundle messages,
UserConfig userConfig,
Language motherTongue,
List<Language> altLanguages)
Get the rules classes that should run for texts in this language.
|
List<String> |
getRuleFileNames()
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. |
String |
getShortCode()
Get this language's character code, e.g.
|
boolean |
isVariant()
|
getCountries
close, createDefaultPostDisambiguationChunker, createDefaultSentenceTokenizer, createDefaultSpellingRule, createDefaultSynthesizer, createDefaultTagger, createDefaultWordTokenizer, getClosingDoubleQuote, getClosingSingleQuote, getDefaultLanguageVariant, getDefaultSpellingRule, getMaintainedState, getNonStrictCompoundSplitter, getOpeningDoubleQuote, getOpeningSingleQuote, getStrictCompoundTokenizer, hasMinMatchesRules, isAdvancedTypographyEnabled, toAdvancedTypography
adaptSuggestion, adaptSuggestions, adjustMatch, createDefaultChunker, createDefaultJLanguageTool, equals, equalsConsiderVariantsIfSpecified, getChunker, getCommonWordsPath, getConsistencyRulePrefix, getDefaultDisabledRulesForVariant, getDefaultEnabledRulesForVariant, 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, initLanguageModel, isExternal, isHiddenFromGui, isSpellcheckOnlyLanguage, mergeSuggestions, setChunker, setDisambiguator, setPostDisambiguationChunker, setSentenceTokenizer, setSynthesizer, setTagger, setWordTokenizer, toString
public boolean isVariant()
Language
Language
, but a subclass of Language
.isVariant
in class GermanyGerman
public String getName()
Language
English
or
German (Germany)
.getName
in class GermanyGerman
public String getShortCode()
Language
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.getShortCode
in class German
public Contributor[] getMaintainers()
Language
null
.getMaintainers
in class German
public Disambiguator createDefaultDisambiguator()
Language
Language.getDisambiguator()
if disambiguator is not set.createDefaultDisambiguator
in class German
public List<Rule> getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) throws IOException
Language
getRelevantRules
in class GermanyGerman
IOException
public LanguageModel getLanguageModel(File indexDir) throws IOException
getLanguageModel
in class German
indexDir
- directory with a '3grams' sub directory which contains a Lucene index with 3gram occurrence countsnull
if this language doesn't support oneIOException
public List<Rule> getRelevantLanguageModelRules(ResourceBundle messages, LanguageModel languageModel, UserConfig userConfig) throws IOException
Language
LanguageModel
. Returns an empty list for
languages that don't have such rules.getRelevantLanguageModelRules
in class German
IOException
public List<Rule> getRelevantLanguageModelCapableRules(ResourceBundle messages, @Nullable LanguageModel languageModel, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) throws IOException
Language
LanguageModel
. Returns an empty list for
languages that don't have such rules.getRelevantLanguageModelCapableRules
in class GermanyGerman
languageModel
- null if no language model is availableIOException
protected int getPriorityForId(String id)
Language
getPriorityForId
in class German
public List<String> getRuleFileNames()
Language
/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-
.getRuleFileNames
in class GermanyGerman