Package org.languagetool.rules.patterns
Class FalseFriendRuleLoader
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.languagetool.rules.patterns.FalseFriendRuleLoader
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
Loads
PatternRule
s from a false friends XML file.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFalseFriendRuleLoader
(String falseFriendHint, String falseFriendSugg) FalseFriendRuleLoader
(Language motherTongue) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
final List<AbstractPatternRule>
final List<AbstractPatternRule>
getRules
(InputStream stream, Language textLanguage, Language motherTongue) Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
falseFriendHint
-
falseFriendSugg
-
-
Constructor Details
-
FalseFriendRuleLoader
-
FalseFriendRuleLoader
-
-
Method Details
-
getRules
public final List<AbstractPatternRule> getRules(File file, Language language, Language motherTongue) throws IOException - Parameters:
file
- XML file with false friend rules- Throws:
IOException
- Since:
- 2.3
-
getRules
public final List<AbstractPatternRule> getRules(InputStream stream, Language textLanguage, Language motherTongue) throws ParserConfigurationException, SAXException, IOException -
formatSuggestions
-