Class BitextPatternRuleHandler
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.languagetool.rules.patterns.XMLRuleHandler
org.languagetool.rules.patterns.PatternRuleHandler
org.languagetool.rules.patterns.bitext.BitextPatternRuleHandler
- All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<StringPair> private List<IncorrectBitextExample> private final List<BitextPatternRule> private static final Stringprivate static final Stringprivate IncorrectExampleprivate Languageprivate PatternRuleprivate static final Stringprivate static final Stringprivate IncorrectExampleprivate PatternRuleFields inherited from class PatternRuleHandler
category, categoryIssueType, filterArgs, filterClassName, name, ruleGroupIssueType, ruleIssueType, sourceFile, TYPEFields inherited from class XMLRuleHandler
AND, andGroupCounter, ANTIPATTERN, CASE_SENSITIVE, caseSensitive, chunkTag, CHUNKTAG, correctExample, DEFAULT, elements, endPositionCorrection, equivalenceFeatures, errorTriggerExample, errorTriggeringExamples, EXAMPLE, exampleCorrection, EXCEPTION, exceptionLevelCaseSensitive, exceptionLevelCaseSet, exceptionPosNegation, exceptionPosRegExp, exceptionPosToken, exceptions, exceptionSet, exceptionSpaceBefore, exceptionSpaceBeforeSet, exceptionStringInflected, exceptionStringNegation, exceptionStringRegExp, exceptionValidNext, exceptionValidPrev, FEATURE, id, ID, IGNORE, inAndGroup, incorrectExample, inCorrectExample, inErrorTriggerExample, inException, INFLECTED, inIncorrectExample, inMarker, inMatch, inMessage, inOrGroup, inPattern, inPhrases, inRegex, inRuleGroup, inShortMessage, inShortMessageForRuleGroup, inSuggestion, inToken, inUnification, inUnificationDef, inUnificationNeutral, inUrl, inUrlForRuleGroup, language, lastPhrase, MARK, MARKER, match, MATCH, MAX, maxOccurrence, message, MESSAGE, MIN, minOccurrence, NAME, NEGATE, NEGATE_POS, NO, OFF, ON, OR, orGroupCounter, PATTERN, patternToken, patternTokens, phraseId, phraseIdRef, phraseMap, phrasePatternTokens, PHRASES, pLocator, posNegation, posRegExp, POSTAG, POSTAG_REGEXP, posToken, regex, regexCaseSensitive, regexMode, REGEXP, regexpMark, regExpression, RULE, RULEGROUP, ruleGroupId, RULES, SCOPE, shortMessage, shortMessageForRuleGroup, SKIP, skipPos, SPACEBEFORE, startPositionCorrection, SUGGESTION, suggestionMatches, suggestionMatchesOutMsg, suggestionsOutMsg, TABNAME, TEMP_OFF, TOKEN, tokenCounter, tokenInflected, tokenLevelCaseSensitive, tokenLevelCaseSet, tokenNegated, tokenReference, tokenSpaceBefore, tokenSpaceBeforeSet, uFeature, UNIFICATION, UNIFY, UNIFY_IGNORE, uniNegation, url, urlForRuleGroup, uType, uTypeList, YES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendElement(String namespaceURI, String sName, String qName) private PatternRule(package private) List<BitextPatternRule> private IncorrectExamplevoidstartElement(String namespaceURI, String lName, String qName, Attributes attrs) Methods inherited from class PatternRuleHandler
characters, prepareRuleMethods inherited from class XMLRuleHandler
addLegacyMatches, error, finalizeExceptions, finalizePhrase, finalizeTokens, getRules, preparePhrase, processElement, resetException, resetToken, setDocumentLocator, setExceptions, setMatchElement, setRuleFilter, setToken, startPattern, warningMethods inherited from class DefaultHandler
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDeclMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declaration
-
Field Details
-
SOURCE
- See Also:
-
TARGET
- See Also:
-
SRC_EXAMPLE
- See Also:
-
TRG_EXAMPLE
- See Also:
-
rules
-
srcRule
-
trgRule
-
trgExample
-
srcExample
-
srcLang
-
correctExamples
-
incorrectExamples
-
-
Constructor Details
-
BitextPatternRuleHandler
BitextPatternRuleHandler()
-
-
Method Details
-
getBitextRules
List<BitextPatternRule> getBitextRules() -
startElement
public void startElement(String namespaceURI, String lName, String qName, Attributes attrs) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classPatternRuleHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classPatternRuleHandler- Throws:
SAXException
-
setExample
-
finalizeRule
-