Summary:
"so" is an adverb in German: https://github.com/wit-ai/wit/issues/1860
It's also a short form for "Sonntag" (Sunday); making the dot mandatory.
Reviewed By: haoxuany
Differential Revision: D22900791
fbshipit-source-id: 8dc873f79a21ca2add074f9c664e84fae56f1e67
Summary: Currently the term "coming" is being treated the same way as "this" or "current". The expected treatment should be the same as the term "next".
Reviewed By: chinmay87
Differential Revision: D22435156
fbshipit-source-id: b0b20d8a38014267fb7d037b685ce126f602bda7
Summary:
Current:
"seis cero cinco pm" [dimension Time] -> "cero cinco pm" or "5 pm"
here the term "seis" was dropped because it was treated as "6" in "Numeral" dimension.
Expected:
"seis cero cinco pm" -> "6:05 pm"
The root cause was that the rule "<hour-of-day> <integer> (as relative minutes)" dropped the first term "hour-of-day" if it was parsed as a latent token.
Reviewed By: chinmay87
Differential Revision: D22553028
fbshipit-source-id: abc92bb369c23d2b3084641eab2a2dabb87dbc66
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Summary: Supporting "orthodox good friday" in addition to "orthodox great friday" in the regex
Reviewed By: chinmay87
Differential Revision: D19604033
fbshipit-source-id: c6ca68fc34e284304ca2ba07a8f1bf81378c3558
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
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
Summary: This got removed in a previous commit, readd this to confirm this functionality is still working.
Reviewed By: haoxuany
Differential Revision: D18175640
fbshipit-source-id: 3d06efe3537e1a517f412ed739f3cc34a9b3105b
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
Summary: Added support for Rama Navami holiday from 2000 to 2030
Reviewed By: chinmay87
Differential Revision: D17881237
fbshipit-source-id: f3f17d67d178fa8fbcb8ae640c3bfc17bc3e21d3
Summary: Added support for Ganesh/Vinayaka Chaturthi Hindu holiday from 2000 to 2030
Reviewed By: haoxuany
Differential Revision: D17675368
fbshipit-source-id: 2d53ad2592fc8d234bd7a3cbac2bddeaa45b220b
Summary:
Refactor Time/PL code by reusing mkRuleHolidays and mkRuleSeasons, and guarding against isOkWithThisNext for ruleLastTime, ruleNextTime, ruleThisTime,
,and mkOkForThisNext for ruleWeekend
Add another polish holidays
Reviewed By: chinmay87
Differential Revision: D17395534
fbshipit-source-id: d4ec591b0aad71f8f5e144ff5274491d55dc97f6
Summary:
Use of ANN pragma may slow down compilation time because of TemplateHaskell.
Because of that, using comment style ignore would be preferable.
For more information on ways to ignore hints with hlint, please see
https://github.com/ndmitchell/hlint#ignoring-hints
Reviewed By: patapizza
Differential Revision: D17365266
fbshipit-source-id: 71e4952738bba17b4d2ec2a18b31b4b7e3f509db
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
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
Summary: Adding support for periodic holidays in Italian
Reviewed By: chinmay87
Differential Revision: D17204304
fbshipit-source-id: 06adf1c5f673263cab7269033d2a312baca842eb
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
Summary: Improved the regex to support "saint"
Reviewed By: patapizza
Differential Revision: D17327533
fbshipit-source-id: 97b8290c416adbc4b32d543b01f408016c62075a
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
Summary: Adding support for Ugadi holiday from 2000 to 2030.
Reviewed By: chinmay87
Differential Revision: D17156412
fbshipit-source-id: b16f710912bf90a1a472661e31d83fbff7043cfe
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
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
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
Summary: Use mkRuleDaysOfWeek for KO language.
Reviewed By: patapizza
Differential Revision: D16441936
fbshipit-source-id: 1bee48cd59caede92cf43056ea5aa4d953827318
Summary: Use mkRuleSeason for KO language.
Reviewed By: patapizza
Differential Revision: D16441908
fbshipit-source-id: 94c450461fe788561dbf41e7b811de3d699f504d
Summary: Use mkRuleHoliday for KO language
Reviewed By: patapizza
Differential Revision: D16441727
fbshipit-source-id: 167c47ed5f3960e9ab68d9b4b444ae9f1c63eda5
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
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
Summary: Adding support for 24h "h" time separator as in "23h45" and "23h".
Reviewed By: patapizza
Differential Revision: D15692699
fbshipit-source-id: 58ae8105ff97b887e9fe171927e89a7c444d7ed5
Summary: Make "the week" resolve to interval from `today` to `end of week`
Reviewed By: patapizza
Differential Revision: D15400571
fbshipit-source-id: 143fa2a8b7c30f1bee0ba8419926db90c680d036
Summary: We need to handle "N minutes past <time>".
Reviewed By: patapizza
Differential Revision: D15283767
fbshipit-source-id: 2a758e62c7af93b7f3c0e5856e38e3f040dcca03
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
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
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
Summary: Added dates for Eid al-Adha from Gregorian calendar years 1950 to 2000.
Reviewed By: patapizza
Differential Revision: D14492291
fbshipit-source-id: 7e5436ae2e5ded798753c29a0e94410a0d848dad
Summary:
- Improved understanding of past periods and dates which include days, months and years.
- Added support for quarters.
- Fixed unnecessary two or more results on some queries.
Pull Request resolved: https://github.com/facebook/duckling/pull/299
Differential Revision: D13878236
Pulled By: patapizza
fbshipit-source-id: 5ae4ac96dd5d75f54ed1567017a81e5a9c8bcc83
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
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
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
Summary: This will allow other modules to import the defined Time rules without redefining it.
Reviewed By: patapizza
Differential Revision: D13613596
fbshipit-source-id: d4232ef3860680de8448f0ad6d586519ba1f2215
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
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
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
Summary: This will allow other modules to import the defined Time rules without redefining it.
Reviewed By: patapizza
Differential Revision: D13320380
fbshipit-source-id: e6fc7214e282de279974e14ad01e9c5b9c8c0986
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
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
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
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
Summary: Adds support for Parsi New Year
Reviewed By: patapizza
Differential Revision: D10208163
fbshipit-source-id: 6c125ab4310cb81c239d9a2ee3c765a4a1841a5c
Summary: Extended Ramadan and Eid al-Fitr from 2029 to 2050 in computed.hs
Reviewed By: chinmay87
Differential Revision: D10304284
fbshipit-source-id: 5240046977632411bf067769499e6afbcda0af7b
Summary: Adding support for Guru Gobind Singh Jayanti holiday from 2000 to 2030.
Reviewed By: chinmay87
Differential Revision: D10148514
fbshipit-source-id: 79e35bcca37f7a87fc6b46fda41edf0a57b424a6
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
Summary: Make rule for in <duration> at <time-of-day>
Reviewed By: patapizza
Differential Revision: D9375588
fbshipit-source-id: e0ebea53005b09e0ef8b70bf4f68d73b0f75df08
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
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
Summary:
Following other Jewish holidays convention, starting on sunset of
previous day.
Reviewed By: chinmay87
Differential Revision: D9315490
fbshipit-source-id: bdfef5ba0c7bca6601bb7557d30840b47734b819
Summary:
We were absorbing "on" followed by any Time token.
Restricting to days of weeks and days of months only.
https://github.com/facebook/duckling/issues/217
Reviewed By: chinmay87
Differential Revision: D9313306
fbshipit-source-id: a0c33658855af8f69631d4d1879cc27062c26a69