You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: date-range-10priority: ${rulepriority}label: DateRangetype: tokenexample: "First two weeks of May"action: mkDateRangeMentionWithWeekpattern: | (?<week> /(?i)(first|second|last)/ /(?i)two/ /(?i)weeks/) /(?i)of/ @month:PossibleMonth
gets processed by
privatedefgetWeekRange(weekNormalizer: WeekNormalizer)(argName: String, m:Mention):Option[WeekRange] = {
valwordsOpt= getArgWords(argName, m)
if (wordsOpt.isEmpty) Noneelseif (wordsOpt.get.mkString("").toLowerCase().equals("last week")) {getLastWeekRange(m)}
elseif (wordsOpt.get.mkString("").toLowerCase().equals("last two weeks")) {getLastTwoWeeksRange(m)}
else weekNormalizer.norm(wordsOpt.get)
}
and doesn't take the possibility of "last weeks [of June]" into account. An internal exception is eventually thrown and also swallowed. weekNormalizer.norm doesn't take care of it, either, because WeekNormalizer.normMapper doesn't have third weeks.
The code should account for any match of the rule and vice versa.
The text was updated successfully, but these errors were encountered:
The text seems to come from this conversation, which is surprisingly even grammatical. Perhaps third can be added as well.
And that's a good point. I think I missed sorghum planting. When are you guys trying to get that in \n\nRight <laugh>? Um, it looks like between the second and third weeks of June.
The rule
gets processed by
and doesn't take the possibility of "last weeks [of June]" into account. An internal exception is eventually thrown and also swallowed.
weekNormalizer.norm
doesn't take care of it, either, becauseWeekNormalizer.normMapper
doesn't havethird weeks
.The code should account for any match of the rule and vice versa.
The text was updated successfully, but these errors were encountered: