public class German extends Language implements AutoCloseable
GermanyGerman, SwissGerman, or AustrianGerman
if you need spell checking.| Constructor and Description |
|---|
German()
Deprecated.
use
GermanyGerman, AustrianGerman, or SwissGerman instead -
they have rules for spell checking, this class doesn't (deprecated since 3.2) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the language model, if any.
|
Disambiguator |
createDefaultDisambiguator()
Creates language specific disambiguator.
|
Chunker |
createDefaultPostDisambiguationChunker()
Creates language specific post disambiguation chunker.
|
SentenceTokenizer |
createDefaultSentenceTokenizer()
Creates language specific sentence tokenizer.
|
SpellingCheckRule |
createDefaultSpellingRule(ResourceBundle messages) |
Synthesizer |
createDefaultSynthesizer()
Creates language specific part-of-speech synthesizer.
|
Tagger |
createDefaultTagger()
Creates language specific part-of-speech tagger.
|
Tokenizer |
createDefaultWordTokenizer()
Creates language specific word tokenizer.
|
String |
getClosingDoubleQuote() |
String |
getClosingSingleQuote() |
String[] |
getCountries()
Get this language's country options , e.g.
|
Language |
getDefaultLanguageVariant()
Languages that have country variants need to overwrite this to select their most common variant.
|
GermanSpellerRule |
getDefaultSpellingRule()
Retrieve default spelling rule for this language
Useful for rules to implement suppression of misspelled suggestions
|
LanguageModel |
getLanguageModel(File indexDir) |
LanguageMaintainedState |
getMaintainedState()
Information about whether the support for this language in LanguageTool is actively maintained.
|
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.
|
CompoundWordTokenizer |
getNonStrictCompoundSplitter() |
String |
getOpeningDoubleQuote() |
String |
getOpeningSingleQuote() |
protected int |
getPriorityForId(String id)
Returns a priority for Rule or Category Id (default: 0).
|
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.
|
String |
getShortCode()
Get this language's character code, e.g.
|
GermanCompoundTokenizer |
getStrictCompoundTokenizer() |
boolean |
hasMinMatchesRules() |
boolean |
isAdvancedTypographyEnabled() |
String |
toAdvancedTypography(String input) |
adaptSuggestion, adaptSuggestions, adjustMatch, createDefaultChunker, createDefaultJLanguageTool, equals, equalsConsiderVariantsIfSpecified, getChunker, getCommonWordsPath, getConsistencyRulePrefix, getDefaultDisabledRulesForVariant, getDefaultEnabledRulesForVariant, getDefaultSpellingRule, getDisambiguationUnifier, getDisambiguationUnifierConfiguration, getDisambiguator, getIgnoredCharactersRegex, getLocale, getLocaleWithCountryAndVariant, getPatternRules, getPostDisambiguationChunker, getRelevantLanguageModelCapableRules, getRelevantRemoteRules, getRelevantRulesGlobalConfig, getRemoteEnhancedRules, getRuleFileNames, getRulePriority, getSentenceTokenizer, getShortCodeWithCountryAndVariant, getSynthesizer, getTagger, getTranslatedName, getUnifier, getUnifierConfiguration, getVariant, getWordTokenizer, hashCode, hasNGramFalseFriendRule, hasVariant, initLanguageModel, isExternal, isHiddenFromGui, isSpellcheckOnlyLanguage, isVariant, mergeSuggestions, setChunker, setDisambiguator, setPostDisambiguationChunker, setSentenceTokenizer, setSynthesizer, setTagger, setWordTokenizer, toString@Deprecated public German()
GermanyGerman, AustrianGerman, or SwissGerman instead -
they have rules for spell checking, this class doesn't (deprecated since 3.2)public Language getDefaultLanguageVariant()
LanguagegetDefaultLanguageVariant in class Languagepublic SpellingCheckRule createDefaultSpellingRule(ResourceBundle messages) throws IOException
createDefaultSpellingRule in class LanguageIOException@NotNull public GermanSpellerRule getDefaultSpellingRule()
LanguagegetDefaultSpellingRule in class Languagepublic Disambiguator createDefaultDisambiguator()
LanguageLanguage.getDisambiguator() if disambiguator is not set.createDefaultDisambiguator in class Language@Nullable public Chunker createDefaultPostDisambiguationChunker()
LanguageLanguage.getPostDisambiguationChunker() if chunker is not set.createDefaultPostDisambiguationChunker in class Languagepublic String getName()
LanguageEnglish or
German (Germany).public String getShortCode()
Languageen 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 Languagepublic String[] getCountries()
LanguageUS (as in en-US) or
PL (as in pl-PL).getCountries in class Language@NotNull public Tagger createDefaultTagger()
Languagenull,
but it can be a trivial pseudo-tagger that only assigns null tags.
This function will be called each time in Language.getTagger() ()} if tagger is not set.createDefaultTagger in class Language@Nullable public Synthesizer createDefaultSynthesizer()
LanguageLanguage.getSynthesizer() if synthesizer is not set.createDefaultSynthesizer in class Languagepublic SentenceTokenizer createDefaultSentenceTokenizer()
LanguageLanguage.getSentenceTokenizer() if sentence tokenizer is not set.createDefaultSentenceTokenizer in class Languagepublic Contributor[] getMaintainers()
Languagenull.getMaintainers in class Languagepublic List<Rule> getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) throws IOException
LanguagegetRelevantRules in class LanguageIOExceptionpublic CompoundWordTokenizer getNonStrictCompoundSplitter()
public GermanCompoundTokenizer getStrictCompoundTokenizer()
public LanguageModel getLanguageModel(File indexDir) throws IOException
getLanguageModel in class LanguageindexDir - directory with a '3grams' sub directory which contains a Lucene index with 3gram occurrence countsnull if this language doesn't support oneIOExceptionpublic List<Rule> getRelevantLanguageModelRules(ResourceBundle messages, LanguageModel languageModel, UserConfig userConfig) throws IOException
LanguageLanguageModel. Returns an empty list for
languages that don't have such rules.getRelevantLanguageModelRules in class LanguageIOExceptionpublic Tokenizer createDefaultWordTokenizer()
LanguageLanguage.getWordTokenizer() if word tokenizer is not set.createDefaultWordTokenizer in class Languagepublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic String getOpeningDoubleQuote()
getOpeningDoubleQuote in class Languagepublic String getClosingDoubleQuote()
getClosingDoubleQuote in class Languagepublic String getOpeningSingleQuote()
getOpeningSingleQuote in class Languagepublic String getClosingSingleQuote()
getClosingSingleQuote in class Languagepublic boolean isAdvancedTypographyEnabled()
isAdvancedTypographyEnabled in class Languagepublic String toAdvancedTypography(String input)
toAdvancedTypography in class Languagepublic LanguageMaintainedState getMaintainedState()
LanguagegetMaintainedState in class Languageprotected int getPriorityForId(String id)
LanguagegetPriorityForId in class Languagepublic boolean hasMinMatchesRules()
hasMinMatchesRules in class Language