Package org.languagetool.language
Class SwissGerman
java.lang.Object
org.languagetool.Language
org.languagetool.LanguageWithModel
org.languagetool.language.German
org.languagetool.language.SwissGerman
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDefaultSpellingRule(ResourceBundle messages) Creates language specific part-of-speech tagger.filterRuleMatches(List<RuleMatch> ruleMatches, AnnotatedText text, Set<String> enabledRules) This function is called by JLanguageTool before CleanOverlappingFilter removes overlapping ruleMatchesString[]Get this language's country options , e.g.getName()Get this language's name in English, e.g.getRelevantLanguageModelCapableRules(ResourceBundle messages, LanguageModel languageModel, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) Get a list of rules that can optionally use aLanguageModel.getRelevantRemoteRules(ResourceBundle messageBundle, List<RemoteRuleConfig> configs, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages, boolean inputLogging) For rules that depend on a remote server; based onRemoteRulewill be executed asynchronously, with timeout, retries, etc.getRelevantRules(ResourceBundle messages, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) Get the rules classes that should run for texts in this language.booleanWhether this is a country variant of another language, i.e.Methods inherited from class org.languagetool.language.German
createDefaultDisambiguator, createDefaultPostDisambiguationChunker, createDefaultSentenceTokenizer, createDefaultSynthesizer, createDefaultWordTokenizer, getClosingSingleQuote, getDefaultLanguageVariant, getDefaultSpellingRule, getInstance, getMaintainedState, getMaintainers, getMultitokenSpeller, getNonStrictCompoundSplitter, getOpeningSingleQuote, getPriorityForId, getPriorityMap, getRelevantLanguageModelRules, getShortCode, getStrictCompoundTokenizer, hasMinMatchesRules, isAdvancedTypographyEnabled, prepareLineForSpeller, toAdvancedTypographyMethods inherited from class org.languagetool.LanguageWithModel
close, getLanguageModel, 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, getRelevantRulesGlobalConfig, getRemoteEnhancedRules, getRuleFileNames, getRulePriority, getSentenceTokenizer, getShortCodeWithCountryAndVariant, getSynthesizer, getTagger, getTranslatedName, getUnifier, getUnifierConfiguration, getVariant, getWordTokenizer, hashCode, hasNGramFalseFriendRule, hasVariant, isExternal, isHiddenFromGui, isSpellcheckOnlyLanguage, setChunker, setDisambiguator, setPostDisambiguationChunker, setSentenceTokenizer, setSynthesizer, setTagger, setWordTokenizer, toString
-
Field Details
-
logger
private static final org.slf4j.Logger logger
-
-
Constructor Details
-
SwissGerman
public SwissGerman()
-
-
Method Details
-
createDefaultTagger
Description copied from class:LanguageCreates language specific part-of-speech tagger. The tagger must not benull, but it can be a trivial pseudo-tagger that only assignsnulltags. This function will be called each time inLanguage.getTagger()()} if tagger is not set.- Overrides:
createDefaultTaggerin classGerman
-
getCountries
Description copied from class:LanguageGet this language's country options , e.g.US(as inen-US) orPL(as inpl-PL).- Overrides:
getCountriesin classGerman- Returns:
- String[] - array of country options for the language.
-
getName
Description copied from class:LanguageGet this language's name in English, e.g.EnglishorGerman (Germany). -
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 classGerman- Throws:
IOException
-
createDefaultSpellingRule
- Overrides:
createDefaultSpellingRulein 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 classLanguage- Parameters:
languageModel- null if no language model is available- Throws:
IOException
-
isVariant
public boolean isVariant()Description copied from class:Language -
getRelevantRemoteRules
public List<Rule> getRelevantRemoteRules(ResourceBundle messageBundle, List<RemoteRuleConfig> configs, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages, boolean inputLogging) throws IOException Description copied from class:LanguageFor rules that depend on a remote server; based onRemoteRulewill be executed asynchronously, with timeout, retries, etc. as configured Can return non-remote rules (e.g. if configuration missing, or for A/B tests), will be executed normally- Overrides:
getRelevantRemoteRulesin classLanguage- Throws:
IOException
-
filterRuleMatches
public List<RuleMatch> filterRuleMatches(List<RuleMatch> ruleMatches, AnnotatedText text, Set<String> enabledRules) Description copied from class:LanguageThis function is called by JLanguageTool before CleanOverlappingFilter removes overlapping ruleMatches- Overrides:
filterRuleMatchesin classGerman- Returns:
- filtered ruleMatches
-
getOpeningDoubleQuote
- Overrides:
getOpeningDoubleQuotein classGerman
-
getClosingDoubleQuote
- Overrides:
getClosingDoubleQuotein classGerman
-