Package org.languagetool.rules.bitext
Class SameTranslationRule
- java.lang.Object
-
- org.languagetool.rules.Rule
-
- org.languagetool.rules.bitext.BitextRule
-
- org.languagetool.rules.bitext.SameTranslationRule
-
public class SameTranslationRule extends BitextRule
Checks if the translation for segments that have more than two words is different.- Author:
- Marcin MiĆkowski
-
-
Constructor Summary
Constructors Constructor Description SameTranslationRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
A short description of the error this rule can detect, usually in the language of the text that is checked.String
getId()
A string used to identify the rule in e.g.String
getMessage()
RuleMatch[]
match(AnalyzedSentence sourceText, AnalyzedSentence targetText)
-
Methods inherited from class org.languagetool.rules.bitext.BitextRule
getCorrectBitextExamples, getIncorrectBitextExamples, getRelevantRules, getSourceLanguage, match, setCorrectBitextExamples, setIncorrectBitextExamples, setSourceLanguage
-
Methods inherited from class org.languagetool.rules.Rule
addExamplePair, estimateContextForSureMatch, getAntiPatterns, getCategory, getConfigureText, getCorrectExamples, getDefaultValue, getErrorTriggeringExamples, getIncorrectExamples, getLocQualityIssueType, getMaxConfigurableValue, getMinConfigurableValue, getSentenceWithImmunization, getUrl, hasConfigurableValue, isDefaultOff, isDefaultTempOff, isDictionaryBasedSpellingRule, isOfficeDefaultOff, isOfficeDefaultOn, makeAntiPatterns, setCategory, setCorrectExamples, setDefaultOff, setDefaultOn, setDefaultTempOff, setErrorTriggeringExamples, setIncorrectExamples, setLocQualityIssueType, setOfficeDefaultOff, setOfficeDefaultOn, setUrl, supportsLanguage, toRuleMatchArray, useInOffice
-
-
-
-
Method Detail
-
getDescription
public String getDescription()
Description copied from class:Rule
A short description of the error this rule can detect, usually in the language of the text that is checked.- Specified by:
getDescription
in classRule
-
getId
public String getId()
Description copied from class:Rule
A 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-Z
and the underscore.
-
getMessage
public String getMessage()
- Specified by:
getMessage
in classBitextRule
-
match
public RuleMatch[] match(AnalyzedSentence sourceText, AnalyzedSentence targetText) throws IOException
- Specified by:
match
in classBitextRule
- Throws:
IOException
-
-