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:
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: Improve support for amount of money in Hebrew
Reviewed By: patapizza
Differential Revision: D13685915
fbshipit-source-id: f9796f52b4d011bdc5e1ef903d5e3dc789bfcd04
Summary:
Hi,
I've added Rules and Corpus for Italian language on "AmountOfMoney".
Running `stack test`, I always get `empty result on "10 000 dollari"`.
I've checked my code more than once but I can't figure out what is not working. I made a PR in order to make it easier for you to understand what's going wrong :)
I really hope that my contribution can help.
Regards!
Pull Request resolved: https://github.com/facebook/duckling/pull/284
Reviewed By: chinmay87
Differential Revision: D13551890
Pulled By: patapizza
fbshipit-source-id: c1b448e44c2c6720ad93f61c6396f4d75231131e
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:
- added TimeGrain dimension for UK language
- added Duration dimension for UK language
Reviewed By: patapizza
Differential Revision: D12871569
fbshipit-source-id: 356c2031aa9582620be11ea634c854c0d96ebbeb
Summary:
`fromName` was missing a pattern to match the new `"credit-card-number"` dimension string representation.
Adding also `CreditCardNumber.Tests.tests` to the `Dimensions Tests` test group.
Reviewed By: chinmay87
Differential Revision: D13072125
fbshipit-source-id: 792727ef038d26ae12ceea909fa726692d56db6d
Summary:
Add the ability to parse credit cards and identify the issuer in Duckling.
Credit card numbers are a sequence of 8 to 19 digits, with a few specific digits at the start that identify the card issuer. They also satisfy Luhn checksum (https://en.wikipedia.org/wiki/Luhn_algorithm).
Reviewed By: chinmay87
Differential Revision: D13014623
fbshipit-source-id: 96586e074777ae90a4a39c515648c31a8111f0c2
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:
Hello.
I have updated Quantity/KM and added 3 more dimensions (Volume/KM, Time/KM, and Distance/KM) for KM.
Please take a look at it.
Pull Request resolved: https://github.com/facebook/duckling/pull/256
Reviewed By: patapizza
Differential Revision: D9758093
Pulled By: xhavokx
fbshipit-source-id: 5a800fd443789795b8e63c88dade3785cfca706c
Summary:
Hello.
I added 3 new dimensions: Ordinal, Quantity, & Temperature. And I also added more data to Numeral dimension.
Thank you!
Pull Request resolved: https://github.com/facebook/duckling/pull/251
Reviewed By: beauby
Differential Revision: D9656646
Pulled By: patapizza
fbshipit-source-id: f17797be811d58b0b5bcd02b83c0a699650c9f6e
Summary:
Added support for AmountOfMoney for KA
Pull Request resolved: https://github.com/facebook/duckling/pull/245
Differential Revision: D9510854
Pulled By: patapizza
fbshipit-source-id: 966c0f69193dd37ed458339fbc381ca640a3a179
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:
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:
This PR adds Temperature dimension support for Hindi (HI). Let me know if there are any changes to be made :)
Cheers!
Closes https://github.com/facebook/duckling/pull/206
Reviewed By: haoxuany
Differential Revision: D8381472
Pulled By: patapizza
fbshipit-source-id: a085ba73910a80a51385f01475d9ba75f72fd4c5
Summary: In Romanian, for numerals above 20, we say "20 de milioane", not "20 milioane".
Reviewed By: haoxuany
Differential Revision: D8334109
fbshipit-source-id: a7fc83440334ab9b1f0511f315029e28449f9771
Summary: In Romanian, we say "19 dolari", but for numerals above 20, it's "20 de dolari" (not "20 dolari").
Reviewed By: haoxuany
Differential Revision: D8324582
fbshipit-source-id: ffd29fa11bbc3a3f0da314f327d26c7b7890545f
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: Make some changes to allow the TemperatureValue type to support intervals.
Reviewed By: patapizza
Differential Revision: D7680835
fbshipit-source-id: d18c67fbb03f14d61cddb53dae3c544513cc67f2
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: 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: 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:
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:
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:
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