Package org.languagetool.rules.ca
Class MorfologikCatalanSpellerRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.spelling.SpellingCheckRule
org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
org.languagetool.rules.ca.MorfologikCatalanSpellerRule
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate final Stringprivate static final Patternprivate static final Patternstatic final String[]static final String[]private static final Patternprivate static final Patternprivate static final Patternprivate static final Stringprivate CatalanTaggerprivate static final Patternprivate static final Patternprivate static final Patternprivate static final Patternprivate static final PatternFields inherited from class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
conversionLocale, globalConfig, motherTongue, speller1, speller2, speller3Fields inherited from class org.languagetool.rules.spelling.SpellingCheckRule
CUSTOM_SPELLING_FILE, GLOBAL_SPELLING_FILE, HIGH_CONFIDENCE, ignoreWordsWithLength, language, languageModel, LANGUAGETOOL, LANGUAGETOOLER, MAX_TOKEN_LENGTH, wordListLoader, wordsToBeIgnored -
Constructor Summary
ConstructorsConstructorDescriptionMorfologikCatalanSpellerRule(ResourceBundle messages, Language language, UserConfig userConfig, List<Language> altLanguages) -
Method Summary
Modifier and TypeMethodDescriptionprivate Stringprivate StringfindSuggestion(String suggestion, String word, Pattern wordPattern, Pattern postagPattern, int suggestionPosition, String separator, String addStr) private StringfindSuggestionMultiplePronouns(String suggestion, String word) Get the name of additional spelling file, which lists words to be accepted and used for suggestions, even when the spell checker would not accept them.protected List<SuggestedReplacement> getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) Get additional suggestions added before other suggestions (note the rule may choose to re-order the suggestions anyway).getAdditionalTopSuggestionsString(List<String> suggestions, String word) Get the filename, e.g.,/resource/pl/spelling.dict.getId()A string used to identify the rule in e.g.Get the name of the spelling file, which lists words to be accepted and used for suggestions, even when the spell checker would not accept them.private booleanmatchPostagRegexp(AnalyzedTokenReadings aToken, Pattern pattern) Match POS tag with regular expressionprotected List<SuggestedReplacement> orderSuggestions(List<SuggestedReplacement> suggestions, String word) protected booleanbooleanWhether this rule should be forced to be used in LO/OO extension.Methods inherited from class org.languagetool.rules.spelling.morfologik.MorfologikSpellerRule
addHyphenSuggestions, getDescription, getRuleMatches, getSpellingSuggestions, getTranslator, ignoreWord, isMisspelled, isMisspelled, match, setCheckCompound, setCompoundRegex, setIgnoreTaggedWords, setLocale, tokenizingPatternMethods inherited from class org.languagetool.rules.spelling.SpellingCheckRule
acceptPhrases, addIgnoreTokens, addIgnoreWords, addProhibitedWords, addSuggestionsToRuleMatch, createWrongSplitMatch, expandLine, filterDupes, filterNoSuggestWords, filterSuggestions, getAdditionalProhibitFileNames, getAdditionalSuggestions, getAntiPatterns, getIgnoreFileName, getLanguageVariantSpellingFileName, getOnlySuggestions, getProhibitFileName, ignorePotentiallyMisspelledWord, ignoreToken, ignoreWord, init, isDictionaryBasedSpellingRule, isEMail, isIgnoredNoCase, isInIgnoredSet, isLatinScript, isProhibited, isUrl, setConsiderIgnoreWords, setConvertsCase, startsWithIgnoredWordMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isGoalSpecific, isIncludedInHiddenMatches, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncludedInHiddenMatches, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setPriority, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray
-
Field Details
-
dictFilename
-
SPELLING_FILE
- See Also:
-
QUOTE_OR_HYPHEN
-
PARTICULA_INICIAL
-
PREFIX_AMB_ESPAI
-
ESPAI_AMB_SUFIX
-
PRONOM_INICIAL
-
APOSTROF_INICI_VERBS
-
APOSTROF_INICI_VERBS_M
-
APOSTROF_INICI_NOM_SING
-
APOSTROF_INICI_NOM_PLURAL
-
APOSTROF_FINAL
-
APOSTROF_FINAL_S
-
GUIONET_FINAL
-
GUIONET_FINAL_GERUNDI
-
SPLIT_DIGITS_AT_END
-
VERB_INDSUBJ
-
VERB_INDSUBJ_M
-
NOM_SING
-
NOM_PLURAL
-
VERB_INFGERIMP
-
VERB_INF
-
VERB_GER
-
LemmasToIgnore
-
LemmasToAllow
-
inalambric
-
PronomsDarrere
-
tagger
-
-
Constructor Details
-
MorfologikCatalanSpellerRule
public MorfologikCatalanSpellerRule(ResourceBundle messages, Language language, UserConfig userConfig, List<Language> altLanguages) throws IOException - Throws:
IOException
-
-
Method Details
-
getAdditionalSpellingFileNames
Description copied from class:SpellingCheckRuleGet the name of additional spelling file, which lists words to be accepted and used for suggestions, even when the spell checker would not accept them.- Overrides:
getAdditionalSpellingFileNamesin classSpellingCheckRule
-
getFileName
Description copied from class:MorfologikSpellerRuleGet the filename, e.g.,/resource/pl/spelling.dict.- Specified by:
getFileNamein classMorfologikSpellerRule
-
getSpellingFileName
Description copied from class:SpellingCheckRuleGet the name of the spelling file, which lists words to be accepted and used for suggestions, even when the spell checker would not accept them.- Overrides:
getSpellingFileNamein classSpellingCheckRule
-
getId
Description copied from class:RuleA string used to identify the rule in e.g. configuration files. This string is supposed to be unique and to stay the same in all upcoming versions of LanguageTool. It's supposed to contain only the charactersA-Zand the underscore.- Specified by:
getIdin classMorfologikSpellerRule
-
useInOffice
public boolean useInOffice()Description copied from class:RuleWhether this rule should be forced to be used in LO/OO extension. Rules that returntruewill be enabled always in LO/OO extension regardless of other options like isDictionaryBasedSpellingRule().- Overrides:
useInOfficein classRule
-
orderSuggestions
protected List<SuggestedReplacement> orderSuggestions(List<SuggestedReplacement> suggestions, String word) - Overrides:
orderSuggestionsin classMorfologikSpellerRule
-
getAdditionalTopSuggestions
protected List<SuggestedReplacement> getAdditionalTopSuggestions(List<SuggestedReplacement> suggestions, String word) throws IOException Description copied from class:SpellingCheckRuleGet additional suggestions added before other suggestions (note the rule may choose to re-order the suggestions anyway). Only add suggestions here that you know are spelled correctly, they will not be checked again before being shown to the user.- Overrides:
getAdditionalTopSuggestionsin classSpellingCheckRule- Throws:
IOException
-
getAdditionalTopSuggestionsString
private List<String> getAdditionalTopSuggestionsString(List<String> suggestions, String word) throws IOException - Throws:
IOException
-
findSuggestion
private String findSuggestion(String suggestion, String word, Pattern wordPattern, Pattern postagPattern, int suggestionPosition, String separator, String addStr) throws IOException - Throws:
IOException
-
findSuggestionMultiplePronouns
-
endsWithPronoun
-
matchPostagRegexp
Match POS tag with regular expression -
tokenizeNewWords
protected boolean tokenizeNewWords()- Overrides:
tokenizeNewWordsin classSpellingCheckRule
-