mirror of
https://github.com/facebook/duckling.git
synced 2024-11-28 00:31:28 +03:00
Time/EN Add <duration> past <time>
Summary: We need to handle "N minutes past <time>". Reviewed By: patapizza Differential Revision: D15283767 fbshipit-source-id: 2a758e62c7af93b7f3c0e5856e38e3f040dcca03
This commit is contained in:
parent
6d980a63a4
commit
0eb5b060d7
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
@ -510,6 +510,7 @@ allExamples = concat
|
|||||||
, "3:15PM"
|
, "3:15PM"
|
||||||
, "3:15p"
|
, "3:15p"
|
||||||
, "at 3 15"
|
, "at 3 15"
|
||||||
|
, "15 minutes past 3pm"
|
||||||
]
|
]
|
||||||
, examples (datetime (2013, 2, 12, 15, 20, 0) Minute)
|
, examples (datetime (2013, 2, 12, 15, 20, 0) Minute)
|
||||||
[ "at 20 past 3pm"
|
[ "at 20 past 3pm"
|
||||||
@ -518,6 +519,7 @@ allExamples = concat
|
|||||||
, "twenty after 3pm"
|
, "twenty after 3pm"
|
||||||
, "3:20p"
|
, "3:20p"
|
||||||
, "at three twenty"
|
, "at three twenty"
|
||||||
|
, "20 minutes past 3pm"
|
||||||
]
|
]
|
||||||
, examples (datetime (2013, 2, 12, 15, 30, 0) Minute)
|
, examples (datetime (2013, 2, 12, 15, 30, 0) Minute)
|
||||||
[ "at half past three pm"
|
[ "at half past three pm"
|
||||||
@ -529,7 +531,19 @@ allExamples = concat
|
|||||||
, "3:30 p m"
|
, "3:30 p m"
|
||||||
, "3:30"
|
, "3:30"
|
||||||
, "half three"
|
, "half three"
|
||||||
|
, "30 minutes past 3 pm"
|
||||||
]
|
]
|
||||||
|
, examples (datetime (2013, 2, 12, 12, 15, 0) Minute)
|
||||||
|
[ "at 15 past noon"
|
||||||
|
, "a quarter past noon"
|
||||||
|
, "12:15 in the afternoon"
|
||||||
|
, "12:15"
|
||||||
|
, "12:15pm"
|
||||||
|
, "12:15PM"
|
||||||
|
, "12:15p"
|
||||||
|
, "at 12 15"
|
||||||
|
, "15 minutes past noon"
|
||||||
|
]
|
||||||
, examples (datetime (2013, 2, 12, 9, 59, 0) Minute)
|
, examples (datetime (2013, 2, 12, 9, 59, 0) Minute)
|
||||||
[ "nine fifty nine a m"
|
[ "nine fifty nine a m"
|
||||||
]
|
]
|
||||||
@ -541,6 +555,17 @@ allExamples = concat
|
|||||||
, "11:45am"
|
, "11:45am"
|
||||||
, "15 to noon"
|
, "15 to noon"
|
||||||
]
|
]
|
||||||
|
, examples (datetime (2013, 2, 12, 13, 15, 0) Minute)
|
||||||
|
[ "a quarter past 1pm"
|
||||||
|
, "1:15pm"
|
||||||
|
, "15 minutes from 1pm"
|
||||||
|
]
|
||||||
|
, examples (datetime (2013, 2, 12, 14, 15, 0) Minute)
|
||||||
|
[ "a quarter past 2pm"
|
||||||
|
]
|
||||||
|
, examples (datetime (2013, 2, 12, 20, 15, 0) Minute)
|
||||||
|
[ "a quarter past 8pm"
|
||||||
|
]
|
||||||
, examples (datetime (2013, 2, 12, 20, 0, 0) Hour)
|
, examples (datetime (2013, 2, 12, 20, 0, 0) Hour)
|
||||||
[ "8 tonight"
|
[ "8 tonight"
|
||||||
, "eight tonight"
|
, "eight tonight"
|
||||||
|
@ -2274,10 +2274,10 @@ ruleInNumeral = Rule
|
|||||||
|
|
||||||
ruleDurationAfterBeforeTime :: Rule
|
ruleDurationAfterBeforeTime :: Rule
|
||||||
ruleDurationAfterBeforeTime = Rule
|
ruleDurationAfterBeforeTime = Rule
|
||||||
{ name = "<duration> after|before|from <time>"
|
{ name = "<duration> after|before|from|past <time>"
|
||||||
, pattern =
|
, pattern =
|
||||||
[ dimension Duration
|
[ dimension Duration
|
||||||
, regex "(after|before|from)"
|
, regex "(after|before|from|past)"
|
||||||
, dimension Time
|
, dimension Time
|
||||||
]
|
]
|
||||||
, prod = \tokens -> case tokens of
|
, prod = \tokens -> case tokens of
|
||||||
|
Loading…
Reference in New Issue
Block a user