Package org.languagetool.rules.de
Class YMDDateCheckFilter
java.lang.Object
org.languagetool.rules.patterns.RuleFilter
org.languagetool.rules.AbstractDateCheckWithSuggestionsFilter
org.languagetool.rules.de.DateCheckFilter
org.languagetool.rules.de.YMDDateCheckFilter
Date filter that expects a 'date' argument in the format 'yyyy-mm-dd'.
- Since:
- 3.2
-
Field Summary
FieldsFields inherited from class org.languagetool.rules.AbstractDateCheckWithSuggestionsFilter
DAY_OF_MONTH_PATTERN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionacceptRuleMatch(RuleMatch match, Map<String, String> args, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) Returns the original rule match or a modified one, ornullif the rule match is filtered out.Methods inherited from class org.languagetool.rules.de.DateCheckFilter
adjustSuggestion, getCalendar, getDayOfWeek, getDayOfWeek, getErrorMessageWrongYear, getMonthMethods inherited from class org.languagetool.rules.AbstractDateCheckWithSuggestionsFilter
getDate, getDayOfMonth, getDayStrLikeOriginalMethods inherited from class org.languagetool.rules.patterns.RuleFilter
getLanguageFromRuleMatch, getOptional, getOptional, getPosition, getRequired, getSkipCorrectedReference, getSynthesizerFromRuleMatch, isMatchAtSentenceStart, matches
-
Field Details
-
ymdDateHelper
-
-
Constructor Details
-
YMDDateCheckFilter
public YMDDateCheckFilter()
-
-
Method Details
-
acceptRuleMatch
public RuleMatch acceptRuleMatch(RuleMatch match, Map<String, String> args, int patternTokenPos, AnalyzedTokenReadings[] patternTokens, List<Integer> tokenPositions) Description copied from class:RuleFilterReturns the original rule match or a modified one, ornullif the rule match is filtered out.- Overrides:
acceptRuleMatchin classAbstractDateCheckWithSuggestionsFilter- Parameters:
args- a map with values foryear,month,day(day of month),weekDaypatternTokens- those tokens of the text that correspond the matched pattern- Returns:
nullif this rule match should be removed, or any other RuleMatch (e.g. the one from the arguments) that properly describes the detected error
-