Commit Graph

329 Commits

Author SHA1 Message Date
Bing Yuan
780bd0aac5 Fixed the problem parsing "next <day-of-week>"
Summary:
If the current time is: 07/07/2020 (tuesday),
Current:
"next saturday" -> 07/11/2020
Expected:
"next saturday" -> 07/18/2020

According to
Quora (https://www.quora.com/When-is-this-Monday-and-next-Monday-Are-they-the-same#:~:text='Next%20Monday'%20is%20Monday%20of,the%20first%20Monday%20after%20today.),

the term "next saturday" means the first saturday in the week after current (this) week, regardless the current day of week.

Reviewed By: haoxuany

Differential Revision: D22420499

fbshipit-source-id: c2bd28b9fda78ff3cb0418a50c3b302be350b02d
2020-07-15 14:47:41 -07:00
Bing Yuan
9c1ab0de69 Tweak the rule for parsing "tomorrow" in ES
Summary:
There are two rules for parsing "manana" (dimension: Time): one is resolved to "morning"; while the other is resolved to "tomorrow". And the first (or "morning") rule resolves to a LATENT result; while the second (or "tomorrow") rule resolves to a NON-LATENT result.

If the duckling is called with "latent" option turned off, the "tomorrow" rule prevails. However, if the duckling is invoked with "latent" option turned on, the "morning" rule is preferred.

The solution (for now) is to steer the classifier towards "tomorrow" rule by adding large number of (same) examples for "tomorrow" rule.

Reviewed By: chinmay87

Differential Revision: D22425277

fbshipit-source-id: 2f139eec0c38b9b5227f27d9f09f6264e7cf86cd
2020-07-15 12:08:20 -07:00
Bing Yuan
82e976b77d Added support for parsing year composed of multiple ES words
Summary:
The root cause is this lacking of support for the composition of numerals in ES.

For example, "mil novecientos noventa" is parsed 3 individual numbers: 1000, 900 and 90 correspondingly. Instead, the expected result is a single numeral value that is the sum of aforementioned three numbers. The same expection can be extended to the composition with arbitrary number of numeral values.

Reviewed By: chinmay87

Differential Revision: D22192034

fbshipit-source-id: 476489145b83297b82d88f3451020c867e2d08aa
2020-07-06 17:02:59 -07:00
Bing Yuan
857aa16d06 added support to parse oridinal day-of-week
Summary:
Current:
"first monday of last month" -> the date of first monday starting from current time. Note here the term "last month" is dropped

Expected:
"first monday of last month" -> the date of first monday of previous month.

Reviewed By: chinmay87

Differential Revision: D22300243

fbshipit-source-id: 16622860c52ec2ce9c7a7bcd6094192255aa5a0b
2020-07-06 15:39:57 -07:00
Bing Yuan
c7aed76c5a added new rule to handle ES phrase for next week (#497)
Summary:
Current:
"siquiente semana" -> [] // empty result

Expected:
"siquiete semana" -> "next week"
Pull Request resolved: https://github.com/facebook/duckling/pull/497

Test Plan: haxlsh> H.io $ debug (makeLocale ES Nothing) "siguiente semana" [This Time]

Reviewed By: chinmay87

Differential Revision: D22054455

Pulled By: yuanbing

fbshipit-source-id: 576e96a49eebace9b5baa382efac2e266e651d8e
2020-07-06 12:50:45 -07:00
Bing Yuan
44007b76d3 Add support for spelled out time of
Summary:
Current:
"twelve zero three" -> 12:00pm

Expected:
"twelve zero three" -> 12:03pm

The root cause was that duckling doesn't support this kind of pattern for timestamp. The uniqueness here was that the number "three" was spelled as "zero three" that Duckling failed to understand.

Reviewed By: chinmay87

Differential Revision: D22313140

fbshipit-source-id: 9e481a142a16b94c61b1770e7f8be036497419f8
2020-07-06 12:17:25 -07:00
Bing Yuan
a78aacfc50 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
2020-06-25 16:04:17 -07:00
Bing Yuan
36a3d2011f Added new rule to parse ES phrase for time of day (in the afternoon) (#496)
Summary:
Current:
"seis dos de lar tarde" -> "dos de lar tarde" or 2pm; note
that the term "seis" is dropped.

Expected:
"seis dos de lar tarde" -> "seis dos de lar tarde"
or 6:02pm
Pull Request resolved: https://github.com/facebook/duckling/pull/496

Test Plan: H.io $ debug (makeLocale ES Nothing) "seis dos de la tarde" [This Time]

Reviewed By: chinmay87

Differential Revision: D22054328

Pulled By: yuanbing

fbshipit-source-id: 1ecb05885fc506176cc04768aa158279c7e7fd4f
2020-06-25 15:07:32 -07:00
Bing Yuan
eb9ddcbd95 Fixed a problem in parsing ES timestamp
Summary:
There are two types of ES phrases for timestamp to support:

1. "para las seis cero dos pm"
2. "para las 6 0 2 pm"

The solution is to:
1. added a new rule to parse two-digit number between 1 and 9 (inclusive);
2. modified the regex pattern to support additional optional phrase "para" in front of "las".

Reviewed By: chinmay87

Differential Revision: D22218800

fbshipit-source-id: 58f692beb6f10834c0ab639b31bf239bf4a1970e
2020-06-25 12:49:39 -07:00
Bing Yuan
1ad3a8514e added new rule to parse phrase in the pattern "xxx minutes to <hour-of-day>" (#500)
Summary:
Current:
20 minutes to 2pm tomorrow -> 20 minutes (dimension: Time)

Expected:
20 minutes to 2pm tomorrow -> 1:45pm of next day (dimension: Time)
Pull Request resolved: https://github.com/facebook/duckling/pull/500

Reviewed By: chinmay87

Differential Revision: D22200580

Pulled By: yuanbing

fbshipit-source-id: e47e5b5aaf4e3644c7032096caa75672a8543087
2020-06-25 11:21:29 -07:00
Bing Yuan
7b2def024e support "noon" phrase in ES
Summary:
This fix is to add support to parse alternative phrase, in ES, for "noon".
Currently the supported ES phrase for "noon" is "mediodia", the alternative form is "medio<whitespace*>dia".

Reviewed By: chinmay87

Differential Revision: D22188049

fbshipit-source-id: 798b83be75798f3b0d695a0f01a65dc84af98e22
2020-06-24 16:36:05 -07:00
Bing Yuan
dddb4adf23 Updated the rule to parse ordinal day of month in ES (#495)
Summary:
the rule is updated to conform with natural expression of "ordinal day of month".
Pull Request resolved: https://github.com/facebook/duckling/pull/495

Differential Revision: D22054297

Pulled By: yuanbing

fbshipit-source-id: d9d8e00311d4d3121685ab5b09f6c1f52f3077c9
2020-06-24 11:47:22 -07:00
Bing Yuan
195a9d7aa1 Added new rule to support ES phrase for "next week". (#493)
Summary:
Please note that the major diff with the
existing rule for next week is that the new
phrase doesn't have the leading "la" or anything with
similar meaning.
Pull Request resolved: https://github.com/facebook/duckling/pull/493

Test Plan: Imported from GitHub, without a Test Plan: line.

Reviewed By: patapizza

Differential Revision: D21981169

Pulled By: yuanbing

fbshipit-source-id: 7478d1262c3a4599d359b485b28a547ad5f44b76
2020-06-24 11:02:24 -07:00
Bing Yuan
8cf3fdb581 Fix a problem with parsing ES time phrase
Summary:
The root cause was the error in parsing the ES numeral value [1-9] that spelled with two words instead of one.

For example "cero dos" should be parsed the as "dos". Currently it's being as two numeral values: 0 and 3.

Reviewed By: chinmay87

Differential Revision: D22162804

fbshipit-source-id: 949956935a21e742f6788e7afa788ff728dd9a8d
2020-06-22 12:03:15 -07:00
Bing Yuan
097b9260d5 Added new rules to parse phrases for upcoming weeks. (#491)
Summary:
the new rules could parse phrases in the form of
xxx upcoming weeks
upcoming xxx weeks
Pull Request resolved: https://github.com/facebook/duckling/pull/491

Test Plan: Imported from GitHub, without a Test Plan: line.

Differential Revision: D21959647

Pulled By: chinmay87

fbshipit-source-id: a062a8c7a6c2e23b921b1099b886fa589c69c454
2020-06-17 14:32:59 -07:00
Cody Ohlsen
474ae1b851 Duckling probabilistic layer bug fix
Summary:
while computing a score used to rank in Duckling, it currently sums up the log likelihoods learned during training. While ranking, the goal is to find the (same span) parse candidate which is _more_ likely to lead to a *correct* parse. However, the old logic was summing up the "more confident of the two classes" log likelihood.From what I understand this is the part which feels wrong.

I created an example of two rules:
#1. a rule where the classifier learns that the rule is very confidently NOT the correct parse.
- okdata (positive class) is very low confidence (high negative number prior)
- kodata (negative class) is very high confidence (low negative number prior)

#2. a rule where the classifier is confident that it is the correct parse, but not Very Confident.
- okdata (positive class) is high confidence (nonzero, but low negative number prior)
- kodata (negative class) is very low confidence (high negative number prior)

these two rules match the same regex, thus the same span. While duckling parses it, it turns out, that rule #1 ranks higher than rule #2. The reason why is because #1 is MORE confident that it is the INCORRECT (does not contribute to) parse than rule #2. Does this make sense?

to solve this problem, I changed the ranking score estimation to use only the positive class scores (okdata). In the example above, it fixes it so rule #2 would end up ranking higher because the positive class confidence is higher than #1's positive class confidence.

Would really love some deeper input from Duckling experts. I re-learned haskell and learned haxl to craft a small example here, and I am very new to Duckling (just started reading the ranking code on Friday). I know Duckling is battle-tested but I also don't believe that means a bug can't exist. And further, this specific bug may not happen a whole lot for 2 reasons:
- there are not a lot of rules which end up higher negative confidence than positive (requires enough negative corpus examples over positive ones)
- ranking uses span width first, and only when the spans are equivalent does the score based ranking come into play. So it requires that 2 rules match the same span before any actual score calculation even matters.

Reviewed By: patapizza

Differential Revision: D22009276

fbshipit-source-id: 13491689d39d810da526fa4bb8b6e526d4cafd35
2020-06-12 16:06:11 -07:00
Bing Yuan
33aa18dca8 Added new rule for "midday" (#490)
Summary:
added new EN rule to parse the phrases that contain "midday".
Pull Request resolved: https://github.com/facebook/duckling/pull/490

Differential Revision: D21959562

Pulled By: chinmay87

fbshipit-source-id: f9ab45aecd551e8959d00b0025ed38b616ed6b14
2020-06-09 14:51:08 -07:00
byuan
596bf62888 Fixed a problem with parsing "day of month" that contains "dia" in it (#487)
Summary:
Current:

"el dia nueve" -> "9pm" of current day

Expected:
"el dia nueve" -> 9th of current or next month

Fix:

added new ES rule to handle the pattern like "el dia  <day of month>"
Pull Request resolved: https://github.com/facebook/duckling/pull/487

Reviewed By: girifb

Differential Revision: D21850807

Pulled By: chinmay87

fbshipit-source-id: d8edd81273c7e5f700b440ccc8c7e7bded679051
2020-06-09 14:51:08 -07:00
byuan
1dac46a8ce Time/es: Make "n horas" latent". (#478)
Summary:
1. ~~Fixed broken build due to the problem with main test entry point;~~
2. Fixed the ambiguous results caused by mishandling the
ranking rules for parsing frames in ES. For example "una hora"
be interpreted either as "Duration" or "1pm" in "Time" dimension.
And the expected result should be in "Duration" dimension.
3. ~~ignore stack lock file~~
Pull Request resolved: https://github.com/facebook/duckling/pull/478

Test Plan:
```
:test Endpoint.Duckling.Tests --hide-successes
[1003 of 1003] Endpoint.Duckling.Tests (Duckling.Api changed)
Ok, two modules loaded.

All 357 tests passed (79.69s)
```

```
haxlsh> H.io $ debug (makeLocale ES Nothing) "de una horas" [This Time, This Duration]
<integer> <unit-of-duration> (una horas)
-- number (0..15) (una)
-- -- regex (una)
-- hora (grain) (horas)
-- -- regex (horas)
[Entity {dim = "duration", body = "una horas", value = RVal Duration (DurationData {value = 1, grain = Hour}), start = 3, end = 12, latent = False, enode = Node {nodeRange = Range 3 12, token = Token Duration (DurationData {value = 1, grain = Hour}), children = [Node {nodeRange = Range 3 6, token = Token Numeral (NumeralData {value = 1.0, grain = Nothing, multipliable = False, okForAnyTime = True}), children = [Node {nodeRange = Range 3 6, token = Token RegexMatch (GroupMatch ["una","","a","","",""]), children = [], rule = Nothing}], rule = Just "number (0..15)"},Node {nodeRange = Range 7 12, token = Token TimeGrain Hour, children = [Node {nodeRange = Range 7 12, token = Token RegexMatch (GroupMatch ["ora"]), children = [], rule = Nothing}], rule = Just "hora (grain)"}], rule = Just "<integer> <unit-of-duration>"}}]
it :: [Entity]
```

Reviewed By: fascpt

Differential Revision: D21770015

Pulled By: chinmay87

fbshipit-source-id: 3056fcf656140c9d65b70b5c604a286ea2c307b2
2020-05-29 11:09:46 -07:00
Chinmay Deshmukh
d91a2dd4c0 Time/es: Fix ruleYearLatent
Summary: Fix `ruleYearLatent` to be the same as the one in `en`. We don't want to match numerals that could have been hours.

Reviewed By: patapizza

Differential Revision: D20683975

fbshipit-source-id: cdef9b1b5f8a21dc5e207ed2a7afcad84c56a596
2020-03-27 15:07:22 -07:00
Julien Odent
f57593c9df Time/EN: the (nth) closest (day) to (time)
Summary:
Leveraging `predNthClosest` helper in English rules.
"the second closest monday to february 6"
"the closest tax day to boss day 2018"

Reviewed By: haoxuany

Differential Revision: D20214444

fbshipit-source-id: b6be32f63097d221aa7ccc6df4e3639e4deee4a9
2020-03-03 12:04:53 -08:00
Julien Odent
11f671a95a Time/EN_US: Super Tuesday
Summary: Adding new holiday.

Reviewed By: haoxuany

Differential Revision: D20193781

fbshipit-source-id: c8be523293b7b6ee836965c8914e3db58cc41085
2020-03-02 10:48:07 -08:00
Jiaxu Zhu
0527be1ce0 Adding Locales for ES Numeral
Summary:
Adding locale rules for ES Numeral because Spain use "," as decimal but south american country use "." as decimal.

Wiki: https://en.wikipedia.org/wiki/Decimal_separator

Reviewed By: haoxuany

Differential Revision: D20040111

fbshipit-source-id: e2a4bfc2928df19976ef98e90ee82e7d21b52313
2020-02-25 16:01:45 -08:00
Andrew Ma
4681cf4bba Time/EN_US: orthodox good friday
Summary: Supporting "orthodox good friday" in addition to "orthodox great friday" in the regex

Reviewed By: chinmay87

Differential Revision: D19604033

fbshipit-source-id: c6ca68fc34e284304ca2ba07a8f1bf81378c3558
2020-01-28 14:24:25 -08:00
Jesse Vermeulen
922d06b6e4 AF Setup + Numeral (#422)
Summary:
- Setup Afrikaans (AF) language
- Added Numeral Dimension

Some of the paths have changed, and some extra files were necessary, after
basing initial work off 24d3f19976

I followed some of the Numeral examples from Dutch as well as Hungarian,
since Afrikaans and Dutch have some similarities.

One thing was examples for numbers having the number as an example, which I
didn't do here, because I'm not sure it's necessary.
Pull Request resolved: https://github.com/facebook/duckling/pull/422

Reviewed By: awalterschulze

Differential Revision: D18348617

Pulled By: patapizza

fbshipit-source-id: b8c4218629c264b48d6f2cecc4c23e2e281a64da
2020-01-10 15:02:50 -08:00
Ondrej Kováč
294771593d Added Slovak (sk) language with numeral dimension and tests.
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/428

Reviewed By: haoxuany

Differential Revision: D18348514

Pulled By: patapizza

fbshipit-source-id: 9b0b9c2caa9fec8330746059eefa6185a8f3e072
2020-01-10 14:49:08 -08:00
Aleksandar Hitrov
cff1ca0080 Add Time dimension for language BG
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/403

Reviewed By: haoxuany

Differential Revision: D18348752

Pulled By: patapizza

fbshipit-source-id: ce3b5c76cb2cf39114216842529d4eaa8df5b93f
2020-01-10 14:34:22 -08:00
David Whitney
0ebaf378dc Duration/EN: parse Xm as X minutes and X.Y hrs as X.Y hours
Summary: modified the regex pattern for minutes to include m alone, as well as the regex pattern for ruleDurationDotNumeralHours to pass h, hr, and hrs

Reviewed By: patapizza

Differential Revision: D18799727

fbshipit-source-id: df4d0bd53407b427254169454e647e43e073795e
2019-12-06 08:47:51 -08:00
Kamolsit Mongkolsrisawat
7f2450e067 Add Numeral dimension for new language TH (#399)
Summary:
Hello,
I am new to Haskell, but I would like to add Thai language (TH) to Duckling.
I have tried to extended Duckling by adding Numeral dimension for new language TH.
Please have a look at it and see what we can improve.

Thanks!
Pull Request resolved: https://github.com/facebook/duckling/pull/399

Reviewed By: patapizza

Differential Revision: D17651508

Pulled By: haoxuany

fbshipit-source-id: 4b3ee1352f239eee637958f5e9dce68430352a0a
2019-11-27 15:48:38 -08:00
Eric Pinkham
a204954397 reuse helpers in HR rules
Summary: [Duckling][Time][HR] Reuse helpers: cleanup code by reusing helper functions in HR rules

Reviewed By: chinmay87

Differential Revision: D18310913

fbshipit-source-id: 0efd69121d25f6a0967b104bfaf97a2b3096ed30
2019-11-07 10:03:56 -08:00
Kai Jun Weng
fa5d74ed34 Time/EN: Support 'the <day-of-month > of <month>'
Summary: We weren't capturing cases like "the second of february" as it was matching with the "the <cycle> of <time>" rule

Differential Revision: D18249651

fbshipit-source-id: 09e214f585b96d07af4d5043de61445f4e156c54
2019-10-31 12:48:29 -07:00
Franz-Julius Chen
ba092881c5 Time/EN_US: Modify this|last|next <cycle>
Summary: We weren't capturing cases like "the first Saturday of the month", due to "the month" not being properly parsed.

Reviewed By: haoxuany

Differential Revision: D18193355

fbshipit-source-id: 2c4e83a3f22b0fe306ce7662ade85434a0016784
2019-10-29 11:16:47 -07:00
Franz-Julius Chen
6f560efa7b Add "<part-of-day> at "<time-of-day>" rule.
Summary:
Parts of day are time ranges, e.g. "tonight" is a range from 6:00pm to midnight. We have intersect logic in place to resolve a string like "tonight at 7pm" to one time, at 7pm. But if the time is outside of the part of day's range (e.g. "tonight at 5pm"), the string is resolved to 2 separate times ("tonight" and "at 5pm").

These changes resolve e.g. "tonight at xx" to "xx" irrespective of the range of tonight, as long as the am/pm makes sense (so "tonight at 5am" would still resolve to 2 separate times - "tonight" and at "5am").

"this/early morning at xx" gets resolved to "xx am". All other parts of day get resolved to "xx pm", with one exception: all parts of day resolve "... at 12" to midnight.

Differential Revision: D17694898

fbshipit-source-id: 1e24023759bb942659285d18a6a4d0b09f77c9da
2019-10-25 17:04:55 -07:00
Meghana Doppalapudi
b6fc40aff3 Time/EN: Added rama navami holiday
Summary: Added support for Rama Navami holiday from 2000 to 2030

Reviewed By: chinmay87

Differential Revision: D17881237

fbshipit-source-id: f3f17d67d178fa8fbcb8ae640c3bfc17bc3e21d3
2019-10-11 12:03:17 -07:00
Manika Puri
1b36e2b819 Time/EN: Added support for Ganesh Chaturthi
Summary: Added support for Ganesh/Vinayaka Chaturthi Hindu holiday from 2000 to 2030

Reviewed By: haoxuany

Differential Revision: D17675368

fbshipit-source-id: 2d53ad2592fc8d234bd7a3cbac2bddeaa45b220b
2019-10-01 12:01:57 -07:00
Anne Chen
332e0cc0a7 Translate periodic holidays
Summary:
Add the support for periodic holidays in Spanish (the ones that make sense in the language).

Skipped Periodic Holidays:
Año Nuevo, Navidad, Nochevieja: These holidays already had rules defined for them in the Rules file (see ruleAnoNuevo, ruleNavidad, ruleNochevieja)
Ugadi: This holiday does not have a translation into Spanish.

Note: Ignoring Lint issues for "Line too long", to follow convention set by original file / previous diffs.

Reviewed By: chinmay87

Differential Revision: D17506908

fbshipit-source-id: 7b43768443dcd4f020a20758995a63ab88706b35
2019-09-25 12:48:20 -07:00
Michael Voegele
4218897f64 Translated all computed holidays from English into German and added HolidayHelpers to reduce code duplication.
Summary: Added German langauage support for all computed holidays currently supported in English. Also created HolidayHelpers, which contains more complex holiday calculations used across languages.

Reviewed By: patapizza

Differential Revision: D17386163

fbshipit-source-id: 9dd88f8b0d699e5d7254a5ba7114bfa01b15176a
2019-09-20 18:32:13 -07:00
Karoly Szabo
71e1b9760d Translate periodic holidays
Summary: Adding support for periodic holidays in Italian

Reviewed By: chinmay87

Differential Revision: D17204304

fbshipit-source-id: 06adf1c5f673263cab7269033d2a312baca842eb
2019-09-18 02:17:00 -07:00
Hao Wang
c5f697ba5a Add support for computed holidays in ZH
Reviewed By: chinmay87

Differential Revision: D17431708

fbshipit-source-id: 88b95877f49c0f46e4c9817020c266c37974daa2
2019-09-17 15:34:08 -07:00
Michael LeMay
1fa17b01d4 Time/EN: Added Ratha-Yatra holiday
Summary:
Added dates for Ratha-Yatra

I double checked the dates, but still could have messed something up.

Reviewed By: patapizza

Differential Revision: D17358944

fbshipit-source-id: bf7c5f81c83c312166c5e3c960534606b95f0c2e
2019-09-16 14:20:21 -07:00
Chinmay Deshmukh
fd8eb2190a En/Time: Support "Saint" Patrick's Day
Summary: Improved the regex to support "saint"

Reviewed By: patapizza

Differential Revision: D17327533

fbshipit-source-id: 97b8290c416adbc4b32d543b01f408016c62075a
2019-09-12 16:31:43 -07:00
Diego Dainese
c9baa741f9 Time: Extend support for Ramadan and Eid al-Fitr from 1950 to 2000
Summary: Previously Duckling was supporting Ramadan and Eid al-Fitr from 2000 to 2029. Now the range has been expanded to start from 1950.

Reviewed By: patapizza

Differential Revision: D17319760

fbshipit-source-id: 008ef7ffef77f293666a32381f663db07b8130ae
2019-09-11 23:48:16 -07:00
Sergei Rybalkin
961930b1ea Add Ugadi holiday
Summary: Adding support for Ugadi holiday from 2000 to 2030.

Reviewed By: chinmay87

Differential Revision: D17156412

fbshipit-source-id: b16f710912bf90a1a472661e31d83fbff7043cfe
2019-09-06 14:57:30 -07:00
Terrance Liang
a63d631a23 reuse helpers
Summary:
guard against `isOkWithThisNext` for ruleThisTime, ruleNextTime and ruleLastTime.

Required changes to be made in ruleNoon, ruleMidnight, and ruleWeekend

Reviewed By: patapizza

Differential Revision: D16999895

fbshipit-source-id: 2c18bd39692389f7e6a9d2fb82802e9dc509893d
2019-09-03 11:18:11 -07:00
Chinmay Deshmukh
436a97e738 Duration/EN: <integer> and a half minutes
Summary: Add rule for "<integer> and a half minutes"

Differential Revision: D17108126

fbshipit-source-id: beaf3eea976572fdec292df6c17303abeb8fcdbf
2019-08-30 13:32:36 -07:00
Julien Odent
a0ca037668 Add back Copyright header to EN_GB classifiers
Summary: as title

Reviewed By: chinmay87

Differential Revision: D16902441

fbshipit-source-id: 9b6d1fe9696191dffef5af315a47666edf715c0d
2019-08-19 22:06:57 -07:00
Shubham Khandelwal
f2af9422bd Add Pargat Diwas holiday | T28481361
Summary:
Adding support for Pargat Diwas holiday from 2000 to 2030. Made changes to:
- corpus.hs (included test)
- computed.hs (included dates): Dates were checked on the sources:
    * https://www.drikpanchang.com/hindu-saints/valmiki/maharishi-valmiki-jayanti.html?year=2020 (year being changed)
    * https://www.festivalsdatetime.co.in/2018/11/2020-valmiki-jayanti-date-and-time-2020.html?m=1 (year being changed)

    For conflicting dates (one day difference), chose www.drikpanchang.com as the primary choice.
- rules.hs (included regex for the festival)

Generated all the related classifiers

Reviewed By: chinmay87

Differential Revision: D16721179

fbshipit-source-id: c3c1023b39ca616374a5d936c08352ee0d4b210d
2019-08-10 01:36:02 -07:00
Hayley Russell
d03423cff5 Reuse helpers
Summary: Guarded against `isOkWithThisNext` for ruleThisTime, ruleNextTime and ruleLastTime. Changes based off of D16589879 and D7200945

Reviewed By: chinmay87

Differential Revision: D16678781

fbshipit-source-id: b1fba9067818d0cc587016651b35d54d5c70e621
2019-08-07 15:33:18 -07:00
Simran Suresh Motwani
a20b98a8ec Reuse helpers
Summary: Reuse mkRuleHolidays, mkRuleSeasons, mkRuleDaysOfWeek, mkRuleMonths in the Arabic rules for Time, and guard against `isOkWithThisNext` for ruleThisTime, ruleNextTime and ruleLastTime.

Reviewed By: chinmay87

Differential Revision: D16589997

fbshipit-source-id: f8e6d7fb6362abc314aa9eb04bfa4b965e1d1e41
2019-08-01 14:46:24 -07:00
Jae Lee
125ab967e0 Use mkRuleDaysOfWeek for KO language
Summary: Use mkRuleDaysOfWeek for KO language.

Reviewed By: patapizza

Differential Revision: D16441936

fbshipit-source-id: 1bee48cd59caede92cf43056ea5aa4d953827318
2019-07-31 16:20:22 -07:00
Jae Lee
fa386a548e Use mkRuleSeason for KO language
Summary: Use mkRuleSeason for KO language.

Reviewed By: patapizza

Differential Revision: D16441908

fbshipit-source-id: 94c450461fe788561dbf41e7b811de3d699f504d
2019-07-31 16:20:22 -07:00
Jae Lee
70dde3bc60 Use mkRuleHoliday for KO language
Summary: Use mkRuleHoliday for KO language

Reviewed By: patapizza

Differential Revision: D16441727

fbshipit-source-id: 167c47ed5f3960e9ab68d9b4b444ae9f1c63eda5
2019-07-31 16:20:21 -07:00
Jae Lee
7e17d31201 Added Mahavir Jayanti holiday
Summary: Added Mahavir Jayanti holiday from 2000 to 2030.

Reviewed By: chinmay87

Differential Revision: D16380984

fbshipit-source-id: 025127cfab312645ec622527a217a910a55179d3
2019-07-22 08:31:36 -07:00
Kai Jun Weng
9e96ac802a Time/EN Support for a quarter after <hour-of-day>
Summary:
Essentially "for a quarter after <time-of-day>" gets matched with the "for <duration> from <time>" rule where "quarter" is interpreted as a duration of a few months.
Fixing this by allowing an optional preceding "for " in the quarter "quarter after|past <hour-of-day>" rule.

Reviewed By: chinmay87

Differential Revision: D16166518

fbshipit-source-id: 0215ec6a0dabf227194a14d15c87c8ed5539f9d1
2019-07-10 18:01:56 -07:00
Michael Guarino
ef0919055f Add Karva Chauth to duckling
Summary: Need to manually specify the dates due to differences in the Hindu and Gregorian calendars

Reviewed By: haoxuany

Differential Revision: D16151703

fbshipit-source-id: dfa8136fa133df5b31402fe4ab3825e97ad604aa
2019-07-10 13:16:51 -07:00
Sasa Milic
b29bb5d3ed Support for intervals
Summary:
- Supports singular (like English "a")
- Supports intervals (e.g. EUR 100-200)
- Supports open intervals (like English "more than", "less than")

Reviewed By: haoxuany

Differential Revision: D16069296

fbshipit-source-id: 74808ad28f5673c2ca82f07dcc0934f82910b566
2019-07-02 13:34:55 -07:00
Filipe Correia
7341556898 Time/EN: Adding support for <hour>h<min>
Summary: Adding support for 24h "h" time separator as in "23h45" and "23h".

Reviewed By: patapizza

Differential Revision: D15692699

fbshipit-source-id: 58ae8105ff97b887e9fe171927e89a7c444d7ed5
2019-06-28 08:16:42 -07:00
Chinmay Deshmukh
a9438734c9 Duration/en: 5 additional minutes
Summary: Support more words in rule `ruleDurationNumeralMore`

Reviewed By: patapizza

Differential Revision: D15501197

fbshipit-source-id: feb12cd27dfb964e1e404b1d902828000c9fa4f7
2019-06-03 18:02:51 -07:00
Chinmay Deshmukh
e54cbe3165 Time/EN: "the week"
Summary: Make "the week" resolve to interval from `today` to `end of week`

Reviewed By: patapizza

Differential Revision: D15400571

fbshipit-source-id: 143fa2a8b7c30f1bee0ba8419926db90c680d036
2019-05-23 16:02:57 -07:00
Jens Persson
41f140992d Add support for larger spelled-out Danish ordinals (#346)
Summary:
Adds support for larger spelled-out Danish ordinal number expressions, like
treoghalvfemsindstyvende (93rd)
or
tohundrede og femogfyrrende (245th)
Pull Request resolved: https://github.com/facebook/duckling/pull/346

Reviewed By: patapizza

Differential Revision: D14476918

Pulled By: chinmay87

fbshipit-source-id: eb20ee8d304f291ff4ab2b28c4e272a9d447396e
2019-05-23 16:02:56 -07:00
Julien Odent
bf89e34365 Relicense to BSD3
Reviewed By: JoelMarcey

Differential Revision: D15439223

fbshipit-source-id: c5af3cb06318748142fe503945b38beffadfc28a
2019-05-22 10:46:39 -07:00
Kai Jun Weng
0eb5b060d7 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
2019-05-10 08:46:40 -07:00
Josua Blejeru
54cd64d0ec Fix minor issues in german. (#362)
Summary:
1. Fix a bug for "fünfter"
3. support for "am ersten Dezember" to " am einunddreißigsten Dezember"
3. duckling recognizes  "der fünfte Dezember"

- [x] ``README.md`` is up to date with docker
- [x] ``docker-compose.yml`` is included
- [x] all ``apt-get`` commands are in a single RUN command to avoid multiple stages
- [x] dockerfile now use the files from the directory
- [ ] more tests should be include
Pull Request resolved: https://github.com/facebook/duckling/pull/362

Reviewed By: patapizza

Differential Revision: D15100843

Pulled By: haoxuany

fbshipit-source-id: 407c8bb2a05a1d0cee81c407e81d882fca63a2be
2019-05-01 14:02:06 -07:00
Andrew Eun Kyu Kang
0b551597ce EN/Time: Add "<integer> <day-of-time> from <time>" rule
Summary:
"What is the date three Fridays from now?" resolves incorrectly:

- On Friday, it detects "three fridays", "fridays from now"
- On other days, it detects "three fridays", "from now"

Thus, added a new rule, "<integer> <day-of-week> from <time>" to give the expected result of three Fridays after the current day and added test examples. If there are too many test examples, please let me know!

Reviewed By: chinmay87

Differential Revision: D15110770

fbshipit-source-id: a77b86de8b6d8f7c947df9e14edb17f61bcc8419
2019-04-29 18:16:58 -07:00
Chinmay Deshmukh
9962e25845 Time/EN: "<day> in <duration>" should only operate on grain > Hour
Summary:
`today in one hour` was returning a time interval starting at 1 hr from now and ending at 2 hr from now.

The expected value is a single value one hour from now. This is accomplished by restricting `"<day> in <duration>"` to operaton only on durations with a grain > Hour

Reviewed By: patapizza

Differential Revision: D15055912

fbshipit-source-id: c3141eba358036577d2e14f0d588a99af83f62be
2019-04-24 11:46:35 -07:00
Varun M Rao
10f3ce044f Time/EN: Krishna Janmashtami
Summary: Added Krishna Janmashtami to Duckling.

Reviewed By: chinmay87

Differential Revision: D14763094

fbshipit-source-id: 46d65c74f53010113ccfaab6cc0d40545c3945b9
2019-04-08 16:03:35 -07:00
Nathan Hausman
830e5e3d8e Time/AR: Periodic and Time
Summary: Adding Arabic support for periodic and rule computed holidays.

Reviewed By: patapizza

Differential Revision: D14573637

fbshipit-source-id: 84d8c42acaebc8483c641cc865e54c418c9918aa
2019-03-29 09:48:20 -07:00
Laurence Emms
77e88171d6 Extended support for Eid al-Adha from 1950 to 2000
Summary: Added dates for Eid al-Adha from Gregorian calendar years 1950 to 2000.

Reviewed By: patapizza

Differential Revision: D14492291

fbshipit-source-id: 7e5436ae2e5ded798753c29a0e94410a0d848dad
2019-03-25 11:33:17 -07:00
Hasan Eray Dogan
63195642de Added Guru Ravidass Jayanti
Summary: Added Guru Ravidass Jayanti

Reviewed By: chinmay87

Differential Revision: D14285746

fbshipit-source-id: fee9ebab8ae93d5f5960f3c9cc21765f426d80fa
2019-03-04 09:01:28 -08:00
Hasan Eray Dogan
165208742c Added Rabindra Jayanti holiday
Reviewed By: chinmay87

Differential Revision: D14197864

fbshipit-source-id: 663b511e19fb99a779d310b4433dcb809c838c57
2019-02-27 14:15:50 -08:00
Luciano van der Veekens
6d8a320a40 Time/NL Small bug fix (#314)
Summary:
In the NL time module there's this bug where the following input

_"het is voor 5 personen"_ (english: _"it's for 5 people"_)

extracts a _time_ entity from it, instead of the expected _number_ entity.

This PR aims to fix that problem.
Pull Request resolved: https://github.com/facebook/duckling/pull/314

Reviewed By: patapizza

Differential Revision: D13742641

Pulled By: chinmay87

fbshipit-source-id: 96abb3fef4b6e5b66d0fa179751e2636a7bb4605
2019-02-14 12:16:27 -08:00
Jens Persson
d85c7ee926 Add 'the day before yesterday' rule for German, and a test for it. Al… (#324)
Summary:
Add 'the day before yesterday' rule for German, and a test for it. Also another test
Pull Request resolved: https://github.com/facebook/duckling/pull/324

Reviewed By: patapizza

Differential Revision: D13931961

Pulled By: haoxuany

fbshipit-source-id: 11d9ebd879be3e4d28a762d5638ee300a4132445
2019-02-13 13:31:26 -08:00
akki2825
a2494caf61 add Kannada support (for Numeral)
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/322

Reviewed By: patapizza

Differential Revision: D13888983

Pulled By: haoxuany

fbshipit-source-id: b7a3b5c72dae0ccc637cf6faa14670ebf868bb50
2019-02-08 11:31:39 -08:00
Michele Riva
33b9d20a7a Added IT Rules and Corpus for Distance
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/307

Reviewed By: girifb

Differential Revision: D13606124

Pulled By: patapizza

fbshipit-source-id: 5c8718d4d7dea818d8d70117c2b0d799796ab33c
2019-01-23 10:31:00 -08:00
Hamza Kwisaba
392e584d1b swahili numerical support
Summary: Adding support for swahili numerals

Reviewed By: patapizza

Differential Revision: D13637092

fbshipit-source-id: 6fe0facfa74caae6fd00e0e84b09571aca616f21
2019-01-18 01:16:13 -08:00
Enzo Lebrun
a707be9eae Value before month in zh can be an integers or a chinese char (#301)
Summary:
May 2019 is more often written like' 2019年5月' than ' 2019年五月' so the corresponding integer are added in the regex's rule ruleMonths.
Pull Request resolved: https://github.com/facebook/duckling/pull/301

Reviewed By: haoxuany

Differential Revision: D13606127

Pulled By: patapizza

fbshipit-source-id: 7dd2536e36711b4be42a93419b08dbd66cf31523
2019-01-14 09:45:56 -08:00
Alon Elishkov Harel
2b2af2eb95 Time/NL: Added suport for king's day
Summary: Implemented a rule for king's day (Koningsdag)

Reviewed By: haoxuany

Differential Revision: D13545471

fbshipit-source-id: f43116b14fd8649896941bed23c528d0a39a5881
2019-01-08 23:45:56 -08:00
Wojtek Przechodzeń
e662269626 Time/PL add today evening corpus example (#294)
Summary:
I'm using Duckling on a daily basis for Polish but there is a problem with some time synonyms. I've tried to add some ([#293](https://github.com/facebook/duckling/pull/293)) but unfortunately I couldn't add 'wieczorem' word wich is polish equivalent to `evening`.
Can you give me some tip how I can implement it or just implement that missing synonym?

Thanks for that great tool!
Pull Request resolved: https://github.com/facebook/duckling/pull/294

Reviewed By: chinmay87

Differential Revision: D13554490

Pulled By: patapizza

fbshipit-source-id: 013e3eccc96b44fd3f659c029b7a0542783b0b2c
2019-01-02 14:01:54 -08:00
João Gonçalves
23737375d9 Time/PT: Last and quarter expressions + ordinals 13..99 (#291)
Summary:
Add support for ordinals from 13..99
Add support for quarter expressions like:

- próximo trimestre

- quarto trimestre de 2018

- último trimestre de 2015

- de primeiro trimestre de 2017 até terceiro trimestre de 2017

- entre terceiro mês de 2017 e nono mês de 2017

Add new vocabulary for last expressions like:

- últimos 2 meses

- 2 meses anteriores
Pull Request resolved: https://github.com/facebook/duckling/pull/291

Reviewed By: chinmay87

Differential Revision: D13553884

Pulled By: patapizza

fbshipit-source-id: 330af62bf457ffaab65636b29fb7bb51ba8a3ae5
2019-01-02 14:01:53 -08:00
Martin Heuschober
c0e4c8c926 fix issue #249 (wrong parsing of yyyy-mm-dd dates in DE) (#282)
Summary:
- took regex from EN (which is working)
- added test cases from 2016-01-01 to 2018-12-31

- change non-breaking space to regular space
Pull Request resolved: https://github.com/facebook/duckling/pull/282

Reviewed By: chinmay87

Differential Revision: D13551882

Pulled By: patapizza

fbshipit-source-id: e254be1beaed21226741c55f243ac21eaa06d636
2019-01-02 14:01:53 -08:00
Santosh Kumar Ghosh
d2705eccfb Add Dayananda Saraswati Jayanti holiday
Summary: Added suppport for Dayananda Saraswati Jayanti 2000-2030

Reviewed By: patapizza

Differential Revision: D13267610

fbshipit-source-id: 58e1415235ecd1814fb719ff5a547a75f67a3b6e
2018-12-01 10:16:07 -08:00
uugan
69ffb0f39d Mongolian (#277)
Summary:
MN Setup+Numeral
Pull Request resolved: https://github.com/facebook/duckling/pull/277

Reviewed By: chinmay87

Differential Revision: D13028169

Pulled By: patapizza

fbshipit-source-id: 7d587300918b3ed6211b6ce4147350147b4dc89e
2018-11-26 15:31:08 -08:00
Vitaly Shaydurov
b40e2147a9 Time/UK: added dimensions
Summary:
- added Time dimension for UK language
- added tests for Time dimension for UK language

Reviewed By: patapizza

Differential Revision: D13024050

fbshipit-source-id: e5be933fff8041c42d8fd26ddaf919584912a012
2018-11-19 04:31:03 -08:00
Jeremy L. Morris
4bee26851e Update rules to allow more variation for MonthDDDD intervals. (#271)
Summary:
Fixes [#218](https://github.com/facebook/duckling/issues/218)

**Note:** This is still a work in progress. But, I'm new to both Haskell and this repo and I seem to be stuck. Would appreciate feedback on what I've done so far. Thank you!
Pull Request resolved: https://github.com/facebook/duckling/pull/271

Reviewed By: chinmay87

Differential Revision: D13087476

Pulled By: patapizza

fbshipit-source-id: 2dee0d023794265bd791ae0bbc0e2e2b89ea1959
2018-11-17 00:45:55 -08:00
riccardo.macioce
4c4e0c59b7 Time/IT: wrong results for the ruleDurationAgo rule for the Italian language (#279)
Summary:
Fixes #278
Pull Request resolved: https://github.com/facebook/duckling/pull/279

Differential Revision: D13044464

Pulled By: patapizza

fbshipit-source-id: f4534fda4def6fa590786320fbcbe88d475d0e9e
2018-11-13 14:01:26 -08:00
Julien Odent
d0516324ec Time/VI: don't parse ngày
Summary:
Fixes https://github.com/facebook/duckling/issues/273.
`ngày` can mean day or date in Vietnamese.
Fixed bad Christmas regex.

Reviewed By: chinmay87

Differential Revision: D12955229

fbshipit-source-id: 071b623e581d36f7db4bf356219647147a087a25
2018-11-07 09:45:53 -08:00
Krogsager
d90cf205db Recognize time from abbreviation 'kl' (#267)
Summary:
The common phrase "i dag kl 15" (today at 15:00) will now be recognized with the correct time.
So far duckling has expected the 'kl' to be written as 'kl.'.

Before this pull
`$ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=da_DK&text=i dag kl 15'`
Time is 00:00:00:
```
[{"body":"i dag","start":0,"value":{"values":[{"value":"2018-10-18T00:00:00.000-07:00","grain":"day","type":"value"}],
	**"value":"2018-10-18T00:00:00.000-07:00",**
"grain":"day","type":"value"},"end":5,"dim":"time","latent":false},{"body":"15","start":9,"value":{"value":15,"type":"value"},"end":11,"dim":"number","latent":false}]
```

`$ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=da_DK&text=i dag kl. 15'`
Time is 15:00:00:
```
[{"body":"i dag kl. 15","start":0,"value":{"values":[{"value":"2018-10-18T15:00:00.000-07:00","grain":"hour","type":"value"}],
	"value":"2018-10-18T15:00:00.000-07:00",
"grain":"hour","type":"value"},"end":12,"dim":"time","latent":false}]
```

After this pull:
`$ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=da_DK&text=i dag kl 15'`
Time is 15:00:00
```
[{"body":"i dag kl 15","start":0,"value":{"values":[{"value":"2018-10-18T15:00:00.000-07:00","grain":"hour","type":"value"}],
	"value":"2018-10-18T15:00:00.000-07:00",
"grain":"hour","type":"value"},"end":11,"dim":"time","latent":false}]
```
Pull Request resolved: https://github.com/facebook/duckling/pull/267

Reviewed By: chinmay87

Differential Revision: D10489441

Pulled By: patapizza

fbshipit-source-id: ae574a7057be3adbb29ee1cb0659d4e5afa896e8
2018-10-22 13:46:56 -07:00
Colin Clemmons
ea1ed47336 Time/EN: Adds Support for Parsi New Year
Summary: Adds support for Parsi New Year

Reviewed By: patapizza

Differential Revision: D10208163

fbshipit-source-id: 6c125ab4310cb81c239d9a2ee3c765a4a1841a5c
2018-10-16 13:16:52 -07:00
Makan Diarra
4943798c75 Extend support for Ramadan and Eid al-Fitr from 2029 to 2050
Summary: Extended Ramadan and Eid al-Fitr from 2029 to 2050 in computed.hs

Reviewed By: chinmay87

Differential Revision: D10304284

fbshipit-source-id: 5240046977632411bf067769499e6afbcda0af7b
2018-10-12 10:01:09 -07:00
Egxona Ferati
f2fd05f9c2 Add Guru Gobind Singh Jayanti holiday
Summary: Adding support for Guru Gobind Singh Jayanti holiday from 2000 to 2030.

Reviewed By: chinmay87

Differential Revision: D10148514

fbshipit-source-id: 79e35bcca37f7a87fc6b46fda41edf0a57b424a6
2018-10-03 15:30:52 -07:00
Akhil Ravidas
c46dbb0d92 Support malayalam numerals
Summary: Add support for malayalam numerals in duckling.

Reviewed By: patapizza

Differential Revision: D10075358

fbshipit-source-id: ce7fee2a71d862391980481b018c513981249f3d
2018-09-28 10:30:54 -07:00
kumar-shridhar
4a77765134 Icelandic support
Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/247

Reviewed By: beauby

Differential Revision: D9656660

Pulled By: patapizza

fbshipit-source-id: 993baa9a0e442fc6f6f813a3af717b700c4d89e6
2018-09-06 06:46:02 -07:00
Julien Odent
fd3948169f Time/EN: Intersect "9 tomorrow morning"
Summary:
It didn't intersect before, as `9` is latent and we were guarding against it.
Instead, guard against years (to prevent nonsensical things like `one ninety nine a.m.`) and against 2 latent tokens.

Reviewed By: chinmay87

Differential Revision: D9507044

fbshipit-source-id: 4c97eba8fc1e47bf7b9a78e04dd6b5531898fda6
2018-08-28 16:45:45 -07:00
Nathan Hu
eb0b84a5aa Time/EN: add <datetime> - <datetime> (interval) timezone rule
Summary: Introducing `hasTimezone` flag to prevent double timezone parsing.

Reviewed By: patapizza

Differential Revision: D9317892

fbshipit-source-id: 0e9246abeb65c5fa61725f9b78a1421d85263bdc
2018-08-24 11:45:45 -07:00
Kay Hu
fc801ad600 Time/EN: Holiday name alias fixes
Summary:
Adding holiday aliases:
Veteran Day
Mardi Gras
St. Paddy's Day

Reviewed By: chinmay87

Differential Revision: D9483120

fbshipit-source-id: 50bf8338bbaf5c4a59210331dac00508141be1ee
2018-08-23 17:45:42 -07:00
Chinmay Deshmukh
dd60c1e013 Time/EN: in <duration> at <time-of-day>
Summary: Make rule for in <duration> at <time-of-day>

Reviewed By: patapizza

Differential Revision: D9375588

fbshipit-source-id: e0ebea53005b09e0ef8b70bf4f68d73b0f75df08
2018-08-20 00:30:52 -07:00
Gerben Janssen van Doorn
f70f991b38 Added support Lao numerals
Summary: Duckling didn't support Lao numerals, this diff adds it.

Reviewed By: patapizza

Differential Revision: D9323242

fbshipit-source-id: 5dad0d4dfb4843281a327947690e664c91ab8f1a
2018-08-17 10:31:17 -07:00
Christian Johns
84a4f30f5a Flip month-match expressions in VI ng(à)y regex (#228)
Summary:
Fix issues where date time matching on double-digit months fails for VI.

Reverse the order of month digit matching in two VI rules. Reversing will attempt to capture a two digit month beginning with 1, then fall back to single digit months optionally preceeded with a 0.

The current regex greedily captures months starting with 1, but only of a single digit. (10, 11, and 12) are left out of this calculation, and thus regexes for capturing ng(à)y fail. This leads us into bad capturing on unexpected rules. When matched properly, the idea rules for matching date times are used.

Resolves #225.

I've added to the VI Time Corpus the case in question in #225 and verified its failure at `master` and success on this branch.
Pull Request resolved: https://github.com/facebook/duckling/pull/228

Reviewed By: chinmay87

Differential Revision: D9303795

Pulled By: patapizza

fbshipit-source-id: aa114f886ab0fdcd95f87730d36e5a686afe2f9c
2018-08-16 13:31:07 -07:00
Julien Odent
a3e87589a1 Time: Reuse "now" helper
Summary: Instead of `cycleNth TG.Second 0`.

Reviewed By: chinmay87

Differential Revision: D9341237

fbshipit-source-id: 153dba6edb0b341afad1ee6f7fa04361415be211
2018-08-15 12:45:48 -07:00
Julien Odent
7fba0f0f28 Time: Fix some intervals for time-of-days
Summary:
"from 1:30 to 2pm" resolved to [1:30, 3pm[ with grain `Minute`.
It now resolves to [1:30, 2:01pm[ (same grain).

Reviewed By: chinmay87

Differential Revision: D9338769

fbshipit-source-id: b76c8cc8ac4b6227825c3d21431261f9fb552509
2018-08-15 12:45:48 -07:00