Summary:
Add support for lakh (1e5) and crore (1e7) in Numeral.
This will help resolve "9-7 lakh rupees" to (Rs. 9, Rs. 700000). Next step is to resolve it to (Rs. 900000, Rs. 700000)
Reviewed By: patapizza
Differential Revision: D10417678
fbshipit-source-id: 670115f22015698ff8c7a9d96afd624efd4c864e
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:
There is a small bug in the German numeral dimension. The number "fünfzehn"(15) cannot be recognized correctly due to a typo. This pull request should fix it:)
Pull Request resolved: https://github.com/facebook/duckling/pull/257
Reviewed By: girifb
Differential Revision: D9810012
Pulled By: patapizza
fbshipit-source-id: e2408a2dc237590b24840260e2a97e9b5c8231f3
Summary: Implemented basic latent value support for AmountOfMoney (along with a corpus). Currently only supports raw numbers.
Reviewed By: chinmay87
Differential Revision: D9777183
fbshipit-source-id: 16a454d451b74ddc526e0db1ddc9b4959b677ca6
Summary:
Some small improvements to Norwegian currencies:
- Parse more currencies. Some were not yet defined in `AmountOfMoney.Types` and thus were added
- Parse `norske kroner` as well as `kroner`
- Parse cents of more currencies
- Remove duplicate rule `ruleIntersectXCentsWithAnd` (duplicated in `ruleIntersectAndXCents`)
Pull Request resolved: https://github.com/facebook/duckling/pull/244
Reviewed By: patapizza
Differential Revision: D9505839
Pulled By: haoxuany
fbshipit-source-id: 69c777a24e5138c04f3ada56c5d8541c9837bb8c
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:
Some small improvements to Norwegian numerals:
- Parse powers of ten with spaces as well as dots: `10 000 == 10.000`
- Some more textual powers of ten: `milliard`, `billion`, ...
- Textual numbers from 21 to 99: `tjueen`, `tjueto`, ...
(they were already parsed with spaces, as in `tjue en`, but not without)
Pull Request resolved: https://github.com/facebook/duckling/pull/243
Reviewed By: patapizza
Differential Revision: D9505835
Pulled By: haoxuany
fbshipit-source-id: e42a290b3dd2d5e6a82f00514617b4c3c4dd3416
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:
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:
This diff implements volume intervals in Duckling. It follows the AmountofMoney and Quantity modules in doing so.
I had to make one crucial choice here -- defining the core Volume data type -- and whether the attribute "Unit" was optional (i.e. "Maybe") or not. Like in Quantity and unlike in AmountOfMoney, I made it optional, so that latent volumes can be supported down the line in the codebase.
I also wrote the codebase to be more modular, such that future developers only need to add regular expressions rather than functions for any language. For instance, developers can simply define a fraction (e.g. "eighth") at the start of the file, and new rules will be generated automatically; rather than requiring the developer to create an entirely new rule, as previously. The only (partial) exceptions were in the Arabic and Russian Rules files, where the language structure is more difficult and so I cannot fully implement this. Developers for those two languages may need to write new rules, as before.
Reviewed By: patapizza
Differential Revision: D9043117
fbshipit-source-id: f08de4f167596b5b32d12a79268b8ab92c099b22
Summary: Make rule for in <duration> at <time-of-day>
Reviewed By: patapizza
Differential Revision: D9375588
fbshipit-source-id: e0ebea53005b09e0ef8b70bf4f68d73b0f75df08
Summary: Added support for recognizing nickels, dimes and quarters, as well as numbers of coins.
Reviewed By: patapizza
Differential Revision: D9317706
fbshipit-source-id: 3fb3d63546c9cfe13c094703ddb583c6ac46585b
Summary:
After including a custom dimension in `duckling.cabal` and importing
the constructor in `ExampleMain.hs`, you can query it using the `dims`
parameters (e.g. `dims=["my-dimension"]`).
Note that a custom dimension file should only expose the constructor (i.e.
`MyDimension(..)`) (and maybe a `corpus`).
https://github.com/facebook/duckling/issues/236
Reviewed By: adanielescu
Differential Revision: D9315608
fbshipit-source-id: 4908e7e27b31201c440a0c0db4cd3d567bd1e6f8
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:
Builds have been timing out with Compiler: : #GHC 8.0.2 C. Try `travis_wait` which extends the timeout to 20 mins instead of 10.
The error has been -
```
Linking dist/build/duckling-test/duckling-test ...
The command "cabal build -j1" exited with 0.
$ cabal test -j1 --show-details=always
Preprocessing library duckling-0.1.6.1...
Preprocessing test suite 'duckling-test' for duckling-0.1.6.1...
Running 1 test suites...
Test suite duckling-test: RUNNING...
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
```
Reviewed By: blandinw
Differential Revision: D9020909
fbshipit-source-id: 7ccf8d3265860c3336b5191a5e89a493645bba2a
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:
Support amount of money intervals for VI
Modify ruleNg, ruleDollar, and ruleVND to better capture the usage of VI
In Numeral, add "ngàn" - a common synonym of "nghìn", and "chục" - colloquially used to count tens. Remove "?" in regex of other words as it does not make sense.
Reviewed By: haoxuany
Differential Revision: D8734066
fbshipit-source-id: 15f879ab796025882c85f0ce9f1677c501b364a0