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
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
Summary:
Added "holidays" for daylight savings start and end dates.
In U.S., Daylight Saving start day is the second Sunday in March, end day is the first Sunday in November.
Reviewed By: chinmay87
Differential Revision: D9277160
fbshipit-source-id: 71038d42d14c4a241cfbaf9ac4499c44139d2ba6
Summary:
Hello,
I am new to Haskell, but I would like to add Khmer language (KM) to Duckling.
I have tried to extended Duckling by adding Numeral dimension for new language KM.
Please have a look at it and see what we can improve.
Thanks!
Pull Request resolved: https://github.com/facebook/duckling/pull/234
Reviewed By: blandinw
Differential Revision: D9032639
Pulled By: chinmay87
fbshipit-source-id: 7db19edf732fe6500629cc89e18e0655d7bbc48b
Summary:
add rule to match
<time> + (timezone)
It needs to be a seperate rule from the existing ruleTimezone because we need to make sure a match on both "(" and ")" before and after the timezone string.
if I do regex "(\b|\()XXX(\b|\))" it can't guarantee the match on both.
Reviewed By: xhavokx
Differential Revision: D9143475
fbshipit-source-id: bda686763c3cf69b9e2096ce05878ba592076814
Summary:
Task also says to add "this week", but this is already covered
by the "this <time>" rule.
Reviewed By: chinmay87
Differential Revision: D9018849
fbshipit-source-id: 210daf87ad4221cf734f260932f7c95c8a3e417a
Summary:
Fix the offsets for BST and IST timezones.
BST is +1 (60) and IST is +5:30 (330)
Reviewed By: girifb
Differential Revision: D8981055
fbshipit-source-id: 43ad669c22638031479a7608a8e651b178361c0d
Summary:
Some small improvements to the Norwegian implementation:
- The written number 8 had a typo: "otte" -> "åtte"
- Add support for half an hour before as e.g. "halv to"
- Add support for alternative clock denotation "klokka"
- Add support for alternative tomorrow denotation "i morra"
Pull Request resolved: https://github.com/facebook/duckling/pull/232
Reviewed By: girifb
Differential Revision: D8986441
Pulled By: chinmay87
fbshipit-source-id: 286617d30415febe1f0eda4bc7475ca5c9610734
Summary:
This is causing some issues, e.g. `20-30` resolving to 8:30pm (latent).
Updating `Numeral` rules to account for that (`EN`, `FR`, `NL` following tests).
Differential Revision: D8854891
fbshipit-source-id: ba17099b014d9cf2f48a7d85147cc890b02578f5
Summary:
Adds support for catching `during <month>`.
Wasn't sure whether or not to commit the classifiers, let me know if I got this right :)
Thanks!
Closes https://github.com/facebook/duckling/pull/208
Reviewed By: chinmay87
Differential Revision: D8427153
Pulled By: patapizza
fbshipit-source-id: 72c9567939cd0eeab62870e48d6e084cfe290bf1
Summary:
* fix latent time of days like "ten thirty"
* don't parse time of days above 12 with meridiem like "13 am"
Reviewed By: haoxuany
Differential Revision: D8363720
fbshipit-source-id: 8236babdd5b8ab4163ad39704a295be048d1b03e
Summary: In south Netherlands and in Belgium, Sinterklaas is celebrated on December 6.
Reviewed By: mullender
Differential Revision: D8281767
fbshipit-source-id: 4fc71783b9f543c4dfb04b8ba8481935cfb30dd8
Summary: add rule for "from <time> for <duration>" and "<time> for <duration>" (symmetric to "for <duration> from <time>")
Reviewed By: patapizza
Differential Revision: D8195733
fbshipit-source-id: 86a0a24d847ea004aeed89ce8a144cb3311aee59
Summary: add "a <time-grain> and a half" and "half a <time-grain>" for duration
Reviewed By: patapizza
Differential Revision: D8197599
fbshipit-source-id: ce4d229e7dd73906fe46d964bf48f8a1766a6e70
Summary:
Add the support for periodic holidays in Chinese.
Canonical names of the holidays in Chinese are defined using simplified Chinese since it is used by the majority of the population.
Reviewed By: patapizza
Differential Revision: D8044583
fbshipit-source-id: c3db715b9d8c515c2013ab019012527033a17863
Summary: This updates the rules for Rosh Hashanah and Chanukkah to account for more alternative spellings. It's not exhaustive, but should catch some of the more common ones.
Reviewed By: patapizza
Differential Revision: D8039856
fbshipit-source-id: 7003c50518f5379f4e503d07f5d5b32a065c7ebc
Summary: Adds support for having years qualified with AD or BC. This adds an extra field to the `TimeDatePredicate` to carry around the extra AD/BC info if it has been provided.
Reviewed By: patapizza
Differential Revision: D7940129
fbshipit-source-id: 993469b3ddd5eeca0e94f7c3d3dd061f37c77607
Summary:
This has been bothering me for a while.
In Danish, 'man' means 'you'. E.g. "Kan man det?" translates to "Can you do that?".
As you can imagine, 'man' is used quite frequently. It used to cause a lot of false positives on facebook messenger, but it looks like FM is no longer using Duckling? Either way, unless you add a statistical layer on top of duckling, parsing 'man' as 'Monday' is the exception, not the rule.
This is my first PR, so bear with me if I've overstepped some contribution rules.
Closes https://github.com/facebook/duckling/pull/190
Reviewed By: blandinw
Differential Revision: D7891328
Pulled By: patapizza
fbshipit-source-id: 50c4adb05f206653194e4a151258f851dc9df682
Summary: 3rd full week in May, starting on a Sunday.
Reviewed By: chinmay87
Differential Revision: D7896050
fbshipit-source-id: aaae50b605a8d199b7134e90896da1de8785a11c
Summary:
* CA, US: Wednesday of the last full week of April
* AU: First Friday of May
* NZ: Third Wednesday of April
* ZA: First Wednesday of September
Closes https://github.com/facebook/duckling/pull/192
Reviewed By: chinmay87
Differential Revision: D7894777
Pulled By: patapizza
fbshipit-source-id: 4401c8a09758173965f08129a9b830a369a38941
Summary:
Last Saturday of March unless it falls on Holy Saturday,
in which case it's the Saturday before, between 8:30pm and 9:30pm.
Reviewed By: chinmay87
Differential Revision: D7891433
fbshipit-source-id: e21ce54c865e8ee5280a374c8e8fd36571a2e550
Summary:
According to Wikipedia (https://en.wikipedia.org/wiki/Vesak), Vesak
is celebrated differently across the globe.
As a first stab, taking the day of the full moon in May in the Gregorian
calendar.
Used https://eclipse.gsfc.nasa.gov/SKYCAL/SKYCAL.html to find the full moon in
May.
Reviewed By: chinmay87
Differential Revision: D7881429
fbshipit-source-id: b9897aa0dd32b01a569c8a040749df59cf78ce54
Summary: and National variant for US
Reviewed By: chinmay87
Differential Revision: D7879055
fbshipit-source-id: d1db9fb5a3c4a00cb7332979ec12bb2d9935ca4e
Summary: Make partial meridies latent to not flag spans like "A4 A5"
Reviewed By: patapizza
Differential Revision: D7866300
fbshipit-source-id: 2254750d643ca28474a5340731f9786617dcbadf
Summary:
The first weekday on or after April 15 not falling on Emancipation
Day. Otherwise, the weekday after that.
Reviewed By: chinmay87
Differential Revision: D7745651
fbshipit-source-id: c215d903c250bac5ebc265192794fd324efda812
Summary: Observed is the first weekday closest to April 16.
Reviewed By: haoxuany
Differential Revision: D7735190
fbshipit-source-id: f046dfb5c067464b83764f97114ccf9c805069d0
Summary:
since 2009, since February, etc.
https://github.com/wit-ai/wit/issues/1056
Reviewed By: haoxuany
Differential Revision: D7729314
fbshipit-source-id: a635cdab4ee5f077c77ef0c01180c805675cd0a7
Summary:
I have seen the Call for participation for #175 in Haskell News and thought I would give it a try and exercise in contributing to unknown haskell code.
As I am new to the project, I have probably done a mistake of committing the classifiers. The commit got reverted but it is still associated with the issue. Lesson learned: don't tag commit messages wit the issue numbers.
Closes https://github.com/facebook/duckling/pull/180
Reviewed By: patapizza
Differential Revision: D7717445
Pulled By: haoxuany
fbshipit-source-id: d818f351d03b6c8b3d77984b2060a0a14230696f
Summary: Modify regex to add "Groundhogs day" in regex for "Groundhog Day" in US and CA
Reviewed By: patapizza
Differential Revision: D7605031
fbshipit-source-id: 0cbb45d4edde3345437872f2e5b366c39f6a8b54
Summary:
generalize chinese digit specifier (十百千万亿) parsing, and add hanzi tests
These digits specifiers can be parsed as (<num><speci>)<num>,
by using the multiplicater value <num><speci>, and a connect function that adds them together
(two cases, skipping digits [which requires a 零 in between], and digits in consecutive locations).
Note that 个 is technically a digit specifier,
but in Chinese it is never used directly as a numeral specifier, and always as a counter.
Reviewed By: zliu41
Differential Revision: D7424249
fbshipit-source-id: 20a85a7df1f908ee9879e92b904178fa26a9a5e5
Summary:
Add support for things like -
"mlk day three years ago"
"mlk day in three years"
"Labor Day one year from now"
"Thanksgiving in one year"
"Thanksgiving in 2013"
"january in a year"
"january 3 years ago"
Reviewed By: patapizza
Differential Revision: D7581591
fbshipit-source-id: 6f37a83c5acbff28672c2e8a958eaf37c679cab3
Summary: Now that years are latent, let's absorb the "in" and make them not latent.
Reviewed By: zliu41
Differential Revision: D7587599
fbshipit-source-id: 61a19ac389244df491591d78c28f0301f9124439
Summary: Make all years latent to prevent any four digit number to be considered a year.
Reviewed By: patapizza
Differential Revision: D7559843
fbshipit-source-id: f3a8625dd7d74edfffb13401278d6b4a5110359a
Summary:
Rule to resolve things like:
"27th of next month"
"15th of last month"
"3rd of this month"
Reviewed By: patapizza
Differential Revision: D7543740
fbshipit-source-id: 20bdc194ed7d1466e2ca42c87b73a04ace7c29ab
Summary:
* Fixed computed past series
* Added a few Jewish holidays, pre-computed and built upon.
Reviewed By: chinmay87
Differential Revision: D7511694
fbshipit-source-id: c66a34e6634a9f86101fb2fd3b4a372d75ba5711
Summary: Add Boss's Day (closest working day to Oct 16) in EN
Reviewed By: patapizza
Differential Revision: D7512241
fbshipit-source-id: c8a4a14b77677ed34edebfeb48bfce1019bb059d
Summary:
* fixed Labour Day for most locales
* added Heroes' Day for JM, PH and ZA
* National Patriots' Day for CA
Reviewed By: chinmay87
Differential Revision: D7492156
fbshipit-source-id: 2a99412a55190ffa5a541b47f6d92d0df928fc3b
Summary: Add EN support for this|last|next season
Reviewed By: patapizza
Differential Revision: D7443814
fbshipit-source-id: 925296f793fbe03bcb67d8a6af3eb6695347eedd
Summary:
Return the canonical holiday name if the input had a holiday in it and the date resolves to the date of the holiday.
Add `holiday` to `TimeData`.
Set it in the holiday rule.
Make sure it propogates appropriately in `predNth` and `intersect`.
Make sure it doesn't propogate in other rules.
Add `holiday` to `TimeValue` and set it during `resolve`
Reviewed By: patapizza
Differential Revision: D7441387
fbshipit-source-id: d57602fd294dc6149ab044c05065c1b9250cb331
Summary:
* Added periodic holidays for all English locales
* Fixed father's day in Australia and New Zealand
Reviewed By: chinmay87
Differential Revision: D7450426
fbshipit-source-id: 9ddcf7f08e73e2bb501541d9697d64b7e99a8ef1
Summary: remove `ruleLastTuesdayLastJuly`, it does the exact same thing as `ruleLastTime`
Reviewed By: patapizza
Differential Revision: D7445836
fbshipit-source-id: 95667db4ce376223acce0ea36a6a0493946ceea1
Summary: Add EN support for last night and late last night
Reviewed By: patapizza
Differential Revision: D7369829
fbshipit-source-id: bd1dbecf247e428307adfae3e8e83840f6de77b1
Summary: Added rules for the beginning / end of year / month / week
Reviewed By: patapizza
Differential Revision: D7356994
fbshipit-source-id: 43489b3709b8ab586384321cf9bc79c45668162a
Summary:
Hello,
I wanted to fix problem with two months - May and November for PL language, since it is what I need to use in [wit.ai](http://wit.ai), but.. I'm not sure how to do that. I've created two failing tests, checked `Rules`, but there are already some rules which are responsible for that cases:
`20 listopada` :
`, ( "November" , "listopad|listopada|listopadowi|listopadem|listopadzie|lis\\.?|list\\.?" )`
`20 maja`:
`, ( "May" , "maj|maja|majowi|majem|maju" )`
Can you help me somehow fix that issues because I'm not sure how I can force Duckling to use proper regexp? :)
Closes https://github.com/facebook/duckling/pull/161
Reviewed By: patapizza
Differential Revision: D7353495
Pulled By: panagosg7
fbshipit-source-id: b0c70172e4cc9dbd4635ed64e89ffb463b643f90
Summary:
"DD MM YYYY", "MM DD YYYY" parsed only as a phone number, but it is also a popular datetime format.
I have added new time patterns and tests for this cases.
Closes https://github.com/facebook/duckling/pull/163
Reviewed By: patapizza
Differential Revision: D7320048
Pulled By: panagosg7
fbshipit-source-id: 5ccf1ccca173126f5d2b9b8b2664181f3b13f78b
Summary:
* added periodic holidays for all existing English locales
* moved Independence Day from common to US, as it is country-dependent
* moved Memorial Day from common to US, as it is country-dependent (fixed the one for Canada)
* added Decoration Day as an alias for US Memorial Day
Reviewed By: chinmay87
Differential Revision: D7294129
fbshipit-source-id: 89cdbf91b4c43e1996fa1f4509eac1d1b1978197
Summary:
Before, duckling would parse `"1 2 2"` as the three digit number 122 through
`ruleSkipHundreds`. This, however, allowed the string `"Pay Kiran1 10eur"` to be
parsed as "110 EUR", which was reported in https://github.com/facebook/duckling/issues/159.
This change only accepts alphabetic numerals to pass through `ruleSkipHundreds`
(for example `"one twenty two"`), which presumably was the original intention of
this rule. This fixes the above issue, without any change in Corpus.
Reviewed By: patapizza
Differential Revision: D7151934
fbshipit-source-id: 024a7a0b6a53beb3a0d42d4bb7f542ce3b05726b
Summary: Support lowercase time zones
Reviewed By: patapizza
Differential Revision: D7114137
fbshipit-source-id: 906c4fa5305aea8990e8a5d480ceeec4b584d7db
Summary:
patapizza Did my best, but I'm neither fluent on Dutch or Haskell :) I tried keeping it consistent with the existing code, let me know if there's something I can improve!
Closes https://github.com/facebook/duckling/pull/149
Reviewed By: blandinw
Differential Revision: D6809767
Pulled By: patapizza
fbshipit-source-id: f92802b94ed7588a03219f63e74dbab475e950ab
Summary:
Hi, in this pr:
* Added time dimension to Arabic language, thanks to Hussein-Dahir & Yazeed-Obaid for writing time corpus.
* Fixed some bugs in numeral & ordinals and added more test cases for them.
Also, I don't really understand why do we use classifiers in time dimension?
Closes https://github.com/facebook/duckling/pull/123
Reviewed By: blandinw
Differential Revision: D6583313
Pulled By: patapizza
fbshipit-source-id: f7acdef0c032d7b7fd7d224832fdaf484d2df825
Summary:
* Closes PRs #115, #116.
* `Numeral`: Moves `ruleFractions` to common
* `Numeral/PT`: fixes dot in regex
* `Time`: Moves `isNumeralSafeToUse` to `isIntegerBetween` (more robust and cleaner)
* `Time/EN`: refactored `ruleCycleLastNextN` to `ruleDurationLastNext` (so it also accounts for non-safe Numerals, like "in a few days")
Reviewed By: blandinw
Differential Revision: D6502958
fbshipit-source-id: 6d9c08a23dab88f441aadade08d663c8e0da415d
Summary:
* `ruleIntegerNumeric` was used in all languages but Burmese.
* it seems like the hindu-arabic numerals are slowly getting in Burmese (e.g. recent car plates)
* Moving the rule in `Duckling/Numeral/Common.hs`
Reviewed By: blandinw
Differential Revision: D6498349
fbshipit-source-id: e868dc9960f18f0781e4aa98a0dfcd14969537c9
Summary:
When I write "dois mil e duzentos" the result should be 2200, but duckling recognize the numbers separated and give the result:
`[{"dim":"number","body":"dois","value":{"value":2,"type":"value"},"start":0,"end":4},{"dim":"number","body":"mil","value":{"value":1000,"type":"value"},"start":5,"end":8},{"dim":"time","body":"mil","value":{"values":[],"value":"1000-01-01T00:00:00.000-07:53","grain":"year","type":"value"},"start":5,"end":8},{"dim":"number","body":"duzentos","value":{"value":200,"type":"value"},"start":11,"end":19}]`
Now with this commit, duckling gives the correct result:
`[{"dim":"number","body":"dois mil e duzentos","value":{"value":2200,"type":"value"},"start":0,"end":19}]`
Closes https://github.com/facebook/duckling/pull/117
Reviewed By: blandinw
Differential Revision: D6477925
Pulled By: patapizza
fbshipit-source-id: 26ab503cc8def739c51ceb5bae7546016ba65ad6
Summary:
This adds support for greek times.
There are still some issues with expressions of the form:
```
9:30 - 11:00 την πέμπτη
```
Where `11:00 την πέμπτη` is parsed first (as 11:30 on Thu), instead of prioritizing `9:30 - 11:00` as the training data suggests. These tests are for the moment excluded from the corpus.
Reviewed By: patapizza
Differential Revision: D6376271
fbshipit-source-id: 2f31e058fb88386429070e3b51cd33f93b9c5936
Summary:
When using speech recognition, we might see things like "six thirty six a m" or
"ten thirty p m".
Also fixed the argument order of `timeOfDayAMPM` to be more idiomatic.
Reviewed By: blandinw
Differential Revision: D6316542
fbshipit-source-id: 0008c049040219b3a1dd80d9e4661ba8a246fa7f
Summary:
"d" would parse as "dinsdag" (Tuesday), "zo" would parse as "zondag" (Sunday, also means "so").
Made dots mandatory, to prevent further issues (e.g. "zon" means "sun").
Reviewed By: mullender
Differential Revision: D6312693
fbshipit-source-id: 58c5824e3ff174fc9c293c3f2d13e152c60e51de
Summary:
* add flag for this/next/last time
* fix thanskgiving in EN locales
* `analyzedRangeTest` helper with `rangeTests` for `Time/EN`
Reviewed By: blandinw
Differential Revision: D6191209
fbshipit-source-id: 6eaa117
Summary: The date format changes between EN locales (https://en.wikipedia.org/wiki/Date_format_by_country). This diff fixes how dates are handled in each locale.
Reviewed By: patapizza
Differential Revision: D6156147
fbshipit-source-id: 22f296c