Class DisambiguationPatternRuleReplacer
java.lang.Object
org.languagetool.rules.patterns.AbstractPatternRulePerformer
org.languagetool.tagging.disambiguation.rules.DisambiguationPatternRuleReplacer
- Since:
- 2.3
-
Nested Class Summary
Nested classes/interfaces inherited from class org.languagetool.rules.patterns.AbstractPatternRulePerformer
AbstractPatternRulePerformer.MatchConsumer -
Field Summary
Fields inherited from class org.languagetool.rules.patterns.AbstractPatternRulePerformer
prevMatched, rule, unifiedTokens, unifier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate AnalyzedTokenReadings[]executeAction(AnalyzedSentence sentence, AnalyzedTokenReadings[] whiteTokens, AnalyzedTokenReadings[] unifiedTokens, int firstMatchToken, int lastMatchToken, int matchingTokens, int[] tokenPositions) private booleankeepByDisambig(AnalyzedSentence sentence, int ruleMatchFromPos, int ruleMatchToPos) private booleankeepDespiteFilter(AnalyzedTokenReadings[] tokens, int[] tokenPositions, int firstMatchToken, int lastMatchToken) (package private) AnalyzedSentencereplace(AnalyzedSentence sentence) Methods inherited from class org.languagetool.rules.patterns.AbstractPatternRulePerformer
doMatch, isInterpretPosTagsPreDisambiguation, testAllReadings
-
Constructor Details
-
DisambiguationPatternRuleReplacer
DisambiguationPatternRuleReplacer(DisambiguationPatternRule rule)
-
-
Method Details
-
replace
- Throws:
IOException
-
keepByDisambig
private boolean keepByDisambig(AnalyzedSentence sentence, int ruleMatchFromPos, int ruleMatchToPos) throws IOException - Throws:
IOException
-
keepDespiteFilter
private boolean keepDespiteFilter(AnalyzedTokenReadings[] tokens, int[] tokenPositions, int firstMatchToken, int lastMatchToken) throws IOException - Throws:
IOException
-
executeAction
private AnalyzedTokenReadings[] executeAction(AnalyzedSentence sentence, AnalyzedTokenReadings[] whiteTokens, AnalyzedTokenReadings[] unifiedTokens, int firstMatchToken, int lastMatchToken, int matchingTokens, int[] tokenPositions)
-