mirror of
https://github.com/facebook/duckling.git
synced 2025-01-06 04:53:13 +03:00
Updated the rule to parse "last <day-of-week> of <time>"
Summary: current: last friday in october -> the date of Friday of previous week expected: last friday in october -> the data of last Friday of month october Reviewed By: chinmay87 Differential Revision: D22201326 fbshipit-source-id: 1983c1b9c24aa356977af7def42d5ba07c7f08be
This commit is contained in:
parent
36a3d2011f
commit
a78aacfc50
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1845,6 +1845,10 @@ allExamples = concat
|
||||
, examples (datetimeHoliday (2011, 12, 25, 0, 0, 0) Day "Christmas")
|
||||
[ "the 3rd closest xmas to today"
|
||||
]
|
||||
, examples (datetime (2013, 10, 25, 0, 0, 0) Day)
|
||||
[ "last friday of october"
|
||||
, "last friday in october"
|
||||
]
|
||||
, examples (datetime (2013, 2, 25, 0, 0, 0) Week)
|
||||
[ "upcoming two weeks"
|
||||
, "upcoming two week"
|
||||
|
@ -223,7 +223,7 @@ ruleLastDOWOfTime = Rule
|
||||
, pattern =
|
||||
[ regex "last"
|
||||
, Predicate isADayOfWeek
|
||||
, regex "of"
|
||||
, regex "(of|in)"
|
||||
, dimension Time
|
||||
]
|
||||
, prod = \tokens -> case tokens of
|
||||
|
Loading…
Reference in New Issue
Block a user