public abstract class BitextRule extends Rule
Rule.match(org.languagetool.AnalyzedSentence)
method.Constructor and Description |
---|
BitextRule() |
Modifier and Type | Method and Description |
---|---|
List<StringPair> |
getCorrectBitextExamples()
Get example sentences that are correct and thus will not match this rule.
|
List<IncorrectBitextExample> |
getIncorrectBitextExamples()
Get example sentences that are incorrect and thus will match this rule.
|
abstract String |
getMessage() |
static List<Class<? extends BitextRule>> |
getRelevantRules() |
Language |
getSourceLanguage() |
RuleMatch[] |
match(AnalyzedSentence sentence)
This method makes no sense for bitext, thus it always returns
null . |
abstract RuleMatch[] |
match(AnalyzedSentence sourceText,
AnalyzedSentence targetText) |
void |
setCorrectBitextExamples(List<StringPair> correctExamples)
Set the examples that are correct and thus do not trigger the rule.
|
void |
setIncorrectBitextExamples(List<IncorrectBitextExample> incorrectExamples)
Set the examples that are incorrect and thus do trigger the rule.
|
void |
setSourceLanguage(Language lang)
Set the source language.
|
addExamplePair, addTags, addToneTags, cacheAntiPatterns, estimateContextForSureMatch, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getDescription, getDistanceTokens, getErrorTriggeringExamples, getFullId, getId, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getMinPrevMatches, getSentenceWithImmunization, getSourceFile, getSubId, getTags, getToneTags, getUrl, hasConfigurableValue, hasTag, hasToneTag, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isGoalSpecific, isOfficeDefaultOff, isOfficeDefaultOn, isPremium, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setDistanceTokens, setErrorTriggeringExamples, setExamplePair, setGoalSpecific, setIncorrectExamples, setLocQualityIssueType, setMinPrevMatches, setOfficeDefaultOff, setOfficeDefaultOn, setPremium, setTags, setToneTags, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
public static List<Class<? extends BitextRule>> getRelevantRules()
public abstract String getMessage()
public abstract RuleMatch[] match(AnalyzedSentence sourceText, AnalyzedSentence targetText) throws IOException
IOException
@Nullable public RuleMatch[] match(AnalyzedSentence sentence) throws IOException
null
.match
in class Rule
sentence
- a pre-analyzed sentenceRuleMatch
objectsIOException
public final void setSourceLanguage(Language lang)
lang
- Source Languagepublic final Language getSourceLanguage()
public final void setCorrectBitextExamples(List<StringPair> correctExamples)
public final List<StringPair> getCorrectBitextExamples()
public final void setIncorrectBitextExamples(List<IncorrectBitextExample> incorrectExamples)
public final List<IncorrectBitextExample> getIncorrectBitextExamples()