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
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