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:
Arjan Scherpenisse 2020-08-05 15:20:56 -07:00 committed by Facebook GitHub Bot
parent 3d5e1c3bad
commit df2ada617a
2 changed files with 11 additions and 0 deletions

View File

@ -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"

View File

@ -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
]