mirror of
https://github.com/facebook/duckling.git
synced 2024-12-01 08:19:36 +03:00
NL/Duration: Add "anderhalf uur" (#502)
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/502 Reviewed By: patapizza Differential Revision: D22260625 Pulled By: haoxuany fbshipit-source-id: bf44fdab7def19f6dd0e0ef7763c112a3b024396
This commit is contained in:
parent
3d5e1c3bad
commit
df2ada617a
@ -57,6 +57,9 @@ allExamples = concat
|
||||
, examples (DurationData 45 Minute)
|
||||
[ "3 kwartier"
|
||||
]
|
||||
, examples (DurationData 90 Minute)
|
||||
[ "anderhalf uur"
|
||||
]
|
||||
, examples (DurationData 1 Hour)
|
||||
[ "een uur"
|
||||
, "één uur"
|
||||
|
@ -102,6 +102,13 @@ ruleDurationAndHalfHour = Rule
|
||||
_ -> Nothing
|
||||
}
|
||||
|
||||
ruleDurationOneAndHalfHour :: Rule
|
||||
ruleDurationOneAndHalfHour = Rule
|
||||
{ name = "1 and an half hour"
|
||||
, pattern = [ regex "anderhalf uur"]
|
||||
, prod = \_ -> Just . Token Duration $ duration TG.Minute 90
|
||||
}
|
||||
|
||||
ruleDurationPrecision :: Rule
|
||||
ruleDurationPrecision = Rule
|
||||
{ name = "about|exactly <duration>"
|
||||
@ -122,6 +129,7 @@ rules =
|
||||
, ruleDurationThreeQuartersOfAnHour
|
||||
, ruleDurationDotNumeralHours
|
||||
, ruleDurationAndHalfHour
|
||||
, ruleDurationOneAndHalfHour
|
||||
, ruleDurationPrecision
|
||||
, ruleNumeralQuotes
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user