Package org.languagetool.rules.bitext
Class DifferentPunctuationRule
- java.lang.Object
-
- org.languagetool.rules.Rule
-
- org.languagetool.rules.bitext.BitextRule
-
- org.languagetool.rules.bitext.DifferentPunctuationRule
-
public class DifferentPunctuationRule extends BitextRule
Checks if the translation has the same ending punctuation as the source.- Since:
- 2.9
-
-
Constructor Summary
Constructors Constructor Description DifferentPunctuationRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDescription()A short description of the error this rule can detect, usually in the language of the text that is checked.java.lang.StringgetId()A string used to identify the rule in e.g.java.lang.StringgetMessage()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 java.lang.String getDescription()
Description copied from class:RuleA short description of the error this rule can detect, usually in the language of the text that is checked.- Specified by:
getDescriptionin classRule
-
getId
public java.lang.String 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.
-
getMessage
public java.lang.String getMessage()
- Specified by:
getMessagein classBitextRule
-
match
public RuleMatch[] match(AnalyzedSentence sourceText, AnalyzedSentence targetText) throws java.io.IOException
- Specified by:
matchin classBitextRule- Throws:
java.io.IOException
-
-