Package org.languagetool.rules.uk
Class SimpleReplaceSoftRule
java.lang.Object
org.languagetool.rules.Rule
org.languagetool.rules.AbstractSimpleReplaceRule
org.languagetool.rules.uk.SimpleReplaceSoftRule
A rule that matches words for which better alternatives exist and suggests them instead.
On top of generic replacement list supports allowed word contexts, e.g.
спасіння=ctx: релігія,поезія|рятування|...
Loads the relevant words from
rules/uk/replace_soft.txt.
TODO: AbstractSimpleReplaceRule loads context as part of suggestion list
and to be able to merge contexts for different lemmas we need to extract context out
of suggestions list on every match. We may need to write our own replacement loader to make it right.- Author:
- Andriy Rysin
-
Field Summary
Fields inherited from class org.languagetool.rules.AbstractSimpleReplaceRule
ignoreTaggedWords, subRuleSpecificIds -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.languagetool.rules.AbstractSimpleReplaceRule
createRuleMatch, findMatches, getLocale, getSynthesizer, isCheckLemmas, isTagged, loadFromPath, loadFromPath, match, setCheckLemmas, setIgnoreTaggedWords, useSubRuleSpecificIdsMethods inherited from class org.languagetool.rules.Rule
addExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getAntiPatterns, getCategory, getCorrectExamples, getDistanceTokens, getErrorTriggeringExamples, getFullId, getIncorrectExamples, getLocQualityIssueType, getMinPrevMatches, getPriority, getRuleOptions, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isIncludedInErrorsCorrectedAllAtOnce, 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, useDictionaryBasedFilterForMatches, useInOffice
-
Constructor Details
-
SimpleReplaceSoftRule
- Throws:
IOException
-
-
Method Details
-
getWrongWords
- Specified by:
getWrongWordsin classAbstractSimpleReplaceRule
-
getId
- Overrides:
getIdin classAbstractSimpleReplaceRule
-
getDescription
- Overrides:
getDescriptionin classAbstractSimpleReplaceRule
-
getShort
- Overrides:
getShortin classAbstractSimpleReplaceRule
-
getMessage
- Overrides:
getMessagein classAbstractSimpleReplaceRule
-
isTokenException
- Overrides:
isTokenExceptionin classAbstractSimpleReplaceRule
-
isCaseSensitive
public boolean isCaseSensitive()- Overrides:
isCaseSensitivein classAbstractSimpleReplaceRule
-