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:
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
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:
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
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:
- 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
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
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
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:
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:
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: Support more words in rule `ruleDurationNumeralMore`
Reviewed By: patapizza
Differential Revision: D15501197
fbshipit-source-id: feb12cd27dfb964e1e404b1d902828000c9fa4f7
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:
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:
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:
- 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