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:
I have added __TimeGrain__ support to __Hindi (HI)__. Please let me know if there are any other changes required!
Cheers! :)
Closes https://github.com/facebook/duckling/pull/198
Reviewed By: patapizza
Differential Revision: D8082131
Pulled By: chinmay87
fbshipit-source-id: 73b8263a9f95775c32905edede14113c51b10431
Summary: Make some changes to allow the TemperatureValue type to support intervals.
Reviewed By: patapizza
Differential Revision: D7680835
fbshipit-source-id: d18c67fbb03f14d61cddb53dae3c544513cc67f2
Summary: Changes uses of the financeWith function to use more specific methods which check for either a simple value, or only a currency, making the intent clearer
Reviewed By: haoxuany
Differential Revision: D8064995
fbshipit-source-id: 7321a4482aad8dbdbc7d734eb393220873ad0b51
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: Add implementation of "a grand" and "<num> grand" for AU, BZ, CA, GB, IE, IN, JM, NZ, PH, TT, ZA locales. Some resolve to the local currency (AU, IN), others resolve to Dollar (NZ, PH).
Reviewed By: patapizza
Differential Revision: D7943186
fbshipit-source-id: c71ab462fa9df0ee65223ee82dc2c98457a4e13b
Summary:
Hello!
I have added __Hindi (HI)__ support for the __Duration__ dimension in ```Duckling/Duration/Rules.hs```. Written tests as well in ```Duckling/Duration/Corpus.hs``` and everything is passing and verified (`253 tests passed`).
Cheers!
Closes https://github.com/facebook/duckling/pull/194
Reviewed By: patapizza
Differential Revision: D7999571
Pulled By: chinmay87
fbshipit-source-id: deb5d60ba7f7ecbc2aa4d97ce5fb96e9bbe63b3d
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: Add implementation of "a grand" and "<num> grand" for EN_CA and EN_GB locales
Reviewed By: patapizza
Differential Revision: D7916643
fbshipit-source-id: 0cd55f17ec522c0334f48436a8a8cc19e0560b0b
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:
Starts on the first Friday of August if it's not before August 5th,
otherwise on the second Friday of August.
10-day event, holiday on the Wednesday.
Reviewed By: chinmay87
Differential Revision: D7891529
fbshipit-source-id: 44edb3285851fc76e0de99f1581d8edf08ea9e7c
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: Added support for ",number> grand" and "a grand" to result in thousands of currency amount
Reviewed By: haoxuany
Differential Revision: D7688809
fbshipit-source-id: 72a81c7a1c48329f85c9f525b72b00c479a9edb0
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:
Added GHC option to warn against incomplete patterns.
This is useful to drive the implementation for new languages, and make sure we're not missing anything.
Reviewed By: haoxuany
Differential Revision: D7782889
fbshipit-source-id: 09d92ca37974eed56a22c0edb9e8f74412f7e3f6
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:
Modified `Entity` to use the new `ResolvedVal` data type. Other changes follow naturally. Related issues: https://github.com/facebook/duckling/issues/121 and https://github.com/facebook/duckling/issues/172
Now one can pattern match on the output value, for instance:
```
{-# LANGUAGE GADTs #-}
import Data.Text
import Duckling.Core
import Duckling.Testing.Types
import qualified Duckling.PhoneNumber.Types as PN
parsePhoneNumber :: Text -> Text
parsePhoneNumber input =
case value entity of
(RVal PhoneNumber (PN.PhoneNumberValue v)) -> v
where
(entity:_) = parse input testContext testOptions [This PhoneNumber]
```
Reviewed By: patapizza
Differential Revision: D7502020
fbshipit-source-id: 76ba7b315cfd0d2c61ff95c855b7c95efc0a401c
Summary:
Support custom dimensions
Had to move the definition of `Dimension` from `Duckling.Dimensions.Types` to `Duckling.Types` to avoid cyclic imports between these two modules.
A sample custom dimension is in `exe/CustomDimensionExample.hs`.
Limitations of custom dimensions:
- All rules for a custom dimension must be in the same module with the definition of the custom dimension. Otherwise there will be cyclic imports, because the definition of the dimension and the rules refer to each other.
- The custom dimension must be specified when using `parse`, since there's no way to get all the existing custom dimensions.
Reviewed By: patapizza
Differential Revision: D7630360
fbshipit-source-id: 30e12dcb33611f5692c4f5949de377bf61b75e1e
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