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: Resolves durations such as "2 hours and ten" to 130 minutes or "1 hour and 15" to 75 minutes.
Reviewed By: zhpzuo
Differential Revision: D17822118
fbshipit-source-id: 7da5c0e43ced91cb924046f764c133a66af8ee4d
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:
Allowing the support of decimal values like in human body temperature. Example: 98.6°F
Pull Request resolved: https://github.com/facebook/duckling/pull/408
Reviewed By: girifb
Differential Revision: D17401806
Pulled By: patapizza
fbshipit-source-id: f04b768e2f6cb48c9c50977a5807d62e38f8d545
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: We need to specify the module name for the test module in the cabal file
Reviewed By: patapizza
Differential Revision: D15173223
fbshipit-source-id: 6dc5068c0d1e8fbae99b7ce9d96ae57a4f893490
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: Adding support for decimal numbers written in Arabic script.
Reviewed By: patapizza
Differential Revision: D14700060
fbshipit-source-id: 3261c36dde17dc9e589eac6b6521da6dece814f2