Package org.languagetool.language
Class French
java.lang.Object
org.languagetool.Language
org.languagetool.LanguageWithModel
org.languagetool.language.French
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
BelgianFrench,CanadianFrench,SwissFrench
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Stringprivate static Throwableprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Pattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadjustFrenchRuleMatch(RuleMatch rm, Set<String> enabledRules) Creates language specific disambiguator.Creates language specific sentence tokenizer.createDefaultSpellingRule(ResourceBundle messages) Creates language specific part-of-speech synthesizer.Creates language specific part-of-speech tagger.Creates language specific word tokenizer.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.Languages that have country variants need to overwrite this to select their most common variant.static FrenchInformation about whether the support for this language in LanguageTool is actively maintained.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).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.getRelevantRulesGlobalConfig(ResourceBundle messages, GlobalConfig globalConfig, UserConfig userConfig, Language motherTongue, List<Language> altLanguages) Get the rules classes that should run for texts in this language.Get this language's character code, e.g.booleanbooleanprivate RuleMatchmergeMatches(RuleMatch match1, RuleMatch match2) prepareLineForSpeller(String line) toAdvancedTypography(String input) Methods inherited from class org.languagetool.LanguageWithModel
close, getLanguageModel, initLanguageModelMethods inherited from class org.languagetool.Language
adaptSuggestion, adjustMatch, createDefaultChunker, createDefaultJLanguageTool, createDefaultPostDisambiguationChunker, equals, equalsConsiderVariantsIfSpecified, getChunker, getCommonWordsPath, getConsistencyRulePrefix, getDefaultDisabledRulesForVariant, getDefaultEnabledRulesForVariant, getDefaultRulePriorityForStyle, getDefaultSpellingRule, getDefaultSpellingRule, getDisambiguationUnifier, getDisambiguationUnifierConfiguration, getDisambiguator, getIgnoredCharactersRegex, getLocale, getLocaleWithCountryAndVariant, getPatternRules, getPostDisambiguationChunker, getRelevantLanguageModelCapableRules, getRelevantRemoteRules, getRemoteEnhancedRules, getRuleFileNames, getRulePriority, getSentenceTokenizer, getShortCodeWithCountryAndVariant, getSynthesizer, getTagger, getTranslatedName, getUnifier, getUnifierConfiguration, getVariant, getWordTokenizer, hashCode, hasNGramFalseFriendRule, hasVariant, isExternal, isHiddenFromGui, isSpellcheckOnlyLanguage, isVariant, setChunker, setDisambiguator, setPostDisambiguationChunker, setSentenceTokenizer, setSynthesizer, setTagger, setWordTokenizer, toString
-
Field Details
-
BEFORE_APOS
- See Also:
-
BEFORE_APOS_PATTERN_1
-
BEFORE_APOS_PATTERN_2
-
BEFORE_APOS_PATTERN_3
-
TYPOGRAPHY_PATTERN_1
-
TYPOGRAPHY_PATTERN_2
-
TYPOGRAPHY_PATTERN_3
-
TYPOGRAPHY_PATTERN_4
-
TYPOGRAPHY_PATTERN_5
-
TYPOGRAPHY_PATTERN_6
-
TYPOGRAPHY_PATTERN_7
-
TYPOGRAPHY_PATTERN_8
-
TYPOGRAPHY_PATTERN_9
-
TYPOGRAPHY_PATTERN_10
-
TYPOGRAPHY_PATTERN_11
-
TYPOGRAPHY_PATTERN_12
-
TYPOGRAPHY_PATTERN_13
-
TYPOGRAPHY_PATTERN_14
-
TYPOGRAPHY_PATTERN_15
-
TYPOGRAPHY_PATTERN_16
-
FRENCH_SHORT_CODE
- See Also:
-
instantiationTrace
-
id2prio
-
spellerExceptions
-
-
Constructor Details
-
French
Deprecated.don't use this method besides the inheritance or core code. Languages are not supposed to be instantiated multiple times. They may contain heavy data which may waste the memory. UsegetInstance()instead. -
French
protected French(boolean fakeValue) This is a fake constructor overload for the subclasses. Public constructors can only be used by the LT itself.
-
-
Method Details
-
createDefaultSentenceTokenizer
Description copied from class:LanguageCreates language specific sentence tokenizer. This function will be called each time inLanguage.getSentenceTokenizer()if sentence tokenizer is not set.- Overrides:
createDefaultSentenceTokenizerin classLanguage
-
getName
Description copied from class:LanguageGet this language's name in English, e.g.EnglishorGerman (Germany). -
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
-
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.
-
getDefaultLanguageVariant
Description copied from class:LanguageLanguages that have country variants need to overwrite this to select their most common variant.- Overrides:
getDefaultLanguageVariantin classLanguage- Returns:
- default country variant
-
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 classLanguage
-
createDefaultSynthesizer
Description copied from class:LanguageCreates language specific part-of-speech synthesizer. This function will be called each time inLanguage.getSynthesizer()if synthesizer is not set.- Overrides:
createDefaultSynthesizerin classLanguage
-
createDefaultWordTokenizer
Description copied from class:LanguageCreates language specific word tokenizer. This function will be called each time inLanguage.getWordTokenizer()if word tokenizer is not set.- Overrides:
createDefaultWordTokenizerin classLanguage
-
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 classLanguage
-
getMaintainers
Description copied from class:LanguageGet the name(s) of the maintainer(s) for this language ornull.- Specified by:
getMaintainersin classLanguage
-
createDefaultSpellingRule
- Overrides:
createDefaultSpellingRulein classLanguage- Throws:
IOException
-
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.- Specified by:
getRelevantRulesin classLanguage- Throws:
IOException
-
getRelevantRulesGlobalConfig
public List<Rule> getRelevantRulesGlobalConfig(ResourceBundle messages, GlobalConfig globalConfig, 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:
getRelevantRulesGlobalConfigin classLanguage- 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 classLanguage- Throws:
IOException- Since:
- 3.1
-
getOpeningDoubleQuote
- Overrides:
getOpeningDoubleQuotein classLanguage- Since:
- 5.1
-
getClosingDoubleQuote
- Overrides:
getClosingDoubleQuotein classLanguage- Since:
- 5.1
-
getOpeningSingleQuote
- Overrides:
getOpeningSingleQuotein classLanguage- Since:
- 5.1
-
getClosingSingleQuote
- Overrides:
getClosingSingleQuotein classLanguage- Since:
- 5.1
-
isAdvancedTypographyEnabled
public boolean isAdvancedTypographyEnabled()- Overrides:
isAdvancedTypographyEnabledin classLanguage- Since:
- 5.1
-
toAdvancedTypography
- Overrides:
toAdvancedTypographyin classLanguage
-
getMaintainedState
Description copied from class:LanguageInformation about whether the support for this language in LanguageTool is actively maintained. If not, the user interface might show a warning.- Overrides:
getMaintainedStatein classLanguage
-
getPriorityMap
- Overrides:
getPriorityMapin classLanguage
-
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 classLanguage
-
hasMinMatchesRules
public boolean hasMinMatchesRules()- Overrides:
hasMinMatchesRulesin classLanguage
-
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 classLanguage- Returns:
- filtered ruleMatches
-
mergeMatches
-
prepareLineForSpeller
- Overrides:
prepareLineForSpellerin classLanguage
-
getMultitokenSpeller
- Overrides:
getMultitokenSpellerin classLanguage
-
adjustFrenchRuleMatch
-
getInstance
-