Summary:
Numerals that require intersection with negative numbers don't work, since the negative sign gets parsed
before the intersect rules happen. This fixes it by adding a guard in for positive in the intersection rule.
Reviewed By: patapizza
Differential Revision: D7592225
fbshipit-source-id: 2bc9c708cadeea4012c1f3ef487c61a144325f2a
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: Extended method for making months from a pair, to take a 3-tuple, including a flag indicating whether to make the result latent. Implement the previous mkRuleMonths method in terms of this.
Reviewed By: patapizza
Differential Revision: D7491037
fbshipit-source-id: 4d4c41b46dc0390e17b521480f3daf8306f23834
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:
First Monday on or after May 27th:
https://publicholidays.com.au/reconciliation-day/
Reviewed By: chinmay87
Differential Revision: D7596237
fbshipit-source-id: 5ad4effb30d1e09a988c93fdb85f9dc60d0a1e54
Summary:
Hello,
I have added new directory for AmountOfMoney NL Support
Added two files
- Duckling/AmountOfMoney/NL/Corpus.hs
- Duckling/AmountOfMoney/NL/Rules.hs
Updated File
- Duckling/Rules/NL.hs
Added test cases
- tests/Duckling/AmountOfMoney/NL/Tests.hs
Updated Test file
- tests/Duckling/AmountOfMoney/Tests.hs
Updated
duckling.cabal
Thanks for the review and the latest merge. Looking forward
Regards
Closes https://github.com/facebook/duckling/pull/173
Reviewed By: JonCoens
Differential Revision: D7592192
Pulled By: patapizza
fbshipit-source-id: 5895c29bf7f1033e4ffd791d5915a16d230e9375
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: Earlier distance was implemented, but it was not defined
Reviewed By: patapizza
Differential Revision: D7524341
fbshipit-source-id: e1e8342a6eff5a523a0db31bf301870ae27c513e
Summary:
enforce units are checked in ruleUnitAmount and ruleAmountUnit, and distribute ruleUnitAmount to all
languages, since in some languages this doesn't work (such as for ZH, where value units must succeed amounts)
Reviewed By: patapizza
Differential Revision: D7509840
fbshipit-source-id: 3a79b39721850f9d0289442925fbc02cf69abefb
Summary: show the input that an ambiguous parse is failing at
Reviewed By: patapizza
Differential Revision: D7502191
fbshipit-source-id: 9f0fbf8301413d9007236ba5b6af1f4b41c20269
Summary:
During ranking, due to how candidates are ordered, it is completely possible to have multiple correct candidates
have the exact same rank (equal range and exact equal score). In this case `analyze` returns all of them, which gets
misinterpreted as having multiple tokens in output rather than multiple solutions. Checks this case and gives the
correct prompt for ambiguous parses.
Reviewed By: patapizza
Differential Revision: D7489391
fbshipit-source-id: b66947e37bddb3ac6273843dd79b559aff9d0083
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: Use `HashMap.lookup` to replace the guard match for performance optimization for ordinal rules in Russian.
Reviewed By: chinmay87
Differential Revision: D7372645
fbshipit-source-id: 20555c352a3f65387e0630f5df65c0826af389f1
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: Add an option to return latent time entities. This can be used when one is pretty certain that the input contains a datetime.
Reviewed By: patapizza
Differential Revision: D7254245
fbshipit-source-id: e9e0503cace2691804056fcebdc18fd9090fb181
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