Package org.languagetool
Class UserConfig
java.lang.Object
org.languagetool.UserConfig
User-specific configuration. So far, this contains a list of words and a settings map.
- Since:
- 4.2
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserConfig(List<String> userSpecificSpellerWords) UserConfig(List<String> userSpecificSpellerWords, List<Rule> userSpecificRules, Map<String, Object[]> ruleValues, int maxSpellingSuggestions, Long premiumUid, String userDictName, Long userDictCacheSize, LinguServices linguServices, boolean filterDictionaryMatches, List<String> abTest, Long textSessionId, boolean hidePremiumMatches, List<String> preferredLanguages) UserConfig(List<String> userSpecificSpellerWords, List<Rule> userSpecificRules, Map<String, Object[]> ruleValues, int maxSpellingSuggestions, Long premiumUid, String userDictName, Long userDictCacheSize, LinguServices linguServices, boolean filterDictionaryMatches, List<String> abTest, Long textSessionId, boolean hidePremiumMatches, List<String> preferredLanguages, boolean trustedSource, boolean optInThirdPartyAI, boolean isPremium) UserConfig(List<String> userSpecificSpellerWords, Map<String, Object[]> ruleValues, int maxSpellingSuggestions, Long premiumUid, String userDictName, Long userDictCacheSize, LinguServices linguServices) UserConfig(Map<String, Object[]> ruleValues) UserConfig(Map<String, Object[]> ruleValues, LinguServices linguServices) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbooleanbooleanObject[]getConfigValueByID(String ruleID) booleanintThis may not contain the full preferredLanguages list as it's intended to only be used with ForeignLanguageCheckergetRules()for speedup, certain users custom dictionaries are cached.static booleaninthashCode()booleanvoidinsertConfigValues(Map<String, Object[]> ruleValues) private StringremoveAllButMainLanguagesAndSort(List<String> preferredLanguages) toString()
-
Field Details
-
abTestEnabled
private static boolean abTestEnabled -
userSpecificSpellerWords
-
acceptedPhrases
-
userSpecificRules
-
maxSpellingSuggestions
private final int maxSpellingSuggestions -
userDictCacheSize
-
userDictName
-
configurableRuleValues
-
linguServices
-
filterDictionaryMatches
private final boolean filterDictionaryMatches -
hidePremiumMatches
private final boolean hidePremiumMatches -
textSessionId
-
abTest
-
preferredLanguages
-
trustedSource
private boolean trustedSource -
optInThirdPartyAI
private boolean optInThirdPartyAI -
isPremium
private boolean isPremium
-
-
Constructor Details
-
UserConfig
public UserConfig() -
UserConfig
-
UserConfig
-
UserConfig
-
UserConfig
-
UserConfig
-
UserConfig
public UserConfig(List<String> userSpecificSpellerWords, List<Rule> userSpecificRules, Map<String, Object[]> ruleValues, int maxSpellingSuggestions, Long premiumUid, String userDictName, Long userDictCacheSize, LinguServices linguServices, boolean filterDictionaryMatches, @Nullable List<String> abTest, @Nullable Long textSessionId, boolean hidePremiumMatches, List<String> preferredLanguages) -
UserConfig
public UserConfig(List<String> userSpecificSpellerWords, List<Rule> userSpecificRules, Map<String, Object[]> ruleValues, int maxSpellingSuggestions, Long premiumUid, String userDictName, Long userDictCacheSize, LinguServices linguServices, boolean filterDictionaryMatches, @Nullable List<String> abTest, @Nullable Long textSessionId, boolean hidePremiumMatches, List<String> preferredLanguages, boolean trustedSource, boolean optInThirdPartyAI, boolean isPremium)
-
-
Method Details
-
enableABTests
public static void enableABTests() -
hasABTestsEnabled
public static boolean hasABTestsEnabled() -
removeAllButMainLanguagesAndSort
-
getAcceptedWords
-
buildAcceptedPhrases
-
getAcceptedPhrases
-
getRules
- Since:
- 5.7
-
getMaxSpellingSuggestions
public int getMaxSpellingSuggestions() -
getConfigValues
-
insertConfigValues
-
getConfigValueByID
-
hasLinguServices
public boolean hasLinguServices() -
getLinguServices
-
getUserDictCacheSize
for speedup, certain users custom dictionaries are cached. Null if disabled, else max. number of words in cache- Since:
- 4.3
-
getUserDictName
- Since:
- 4.3
-
getPremiumUid
- Since:
- 4.3
-
equals
-
hashCode
public int hashCode() -
toString
-
getTextSessionId
-
getAbTest
-
filterDictionaryMatches
public boolean filterDictionaryMatches() -
getHidePremiumMatches
public boolean getHidePremiumMatches()- Since:
- 5.5
-
getPreferredLanguages
This may not contain the full preferredLanguages list as it's intended to only be used with ForeignLanguageChecker- Returns:
-