Summary:
I'm using Duckling on a daily basis for Polish but there is a problem with some time synonyms. I've tried to add some ([#293](https://github.com/facebook/duckling/pull/293)) but unfortunately I couldn't add 'wieczorem' word wich is polish equivalent to `evening`.
Can you give me some tip how I can implement it or just implement that missing synonym?
Thanks for that great tool!
Pull Request resolved: https://github.com/facebook/duckling/pull/294
Reviewed By: chinmay87
Differential Revision: D13554490
Pulled By: patapizza
fbshipit-source-id: 013e3eccc96b44fd3f659c029b7a0542783b0b2c
Summary:
Add support for ordinals from 13..99
Add support for quarter expressions like:
- próximo trimestre
- quarto trimestre de 2018
- último trimestre de 2015
- de primeiro trimestre de 2017 até terceiro trimestre de 2017
- entre terceiro mês de 2017 e nono mês de 2017
Add new vocabulary for last expressions like:
- últimos 2 meses
- 2 meses anteriores
Pull Request resolved: https://github.com/facebook/duckling/pull/291
Reviewed By: chinmay87
Differential Revision: D13553884
Pulled By: patapizza
fbshipit-source-id: 330af62bf457ffaab65636b29fb7bb51ba8a3ae5
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:
- took regex from EN (which is working)
- added test cases from 2016-01-01 to 2018-12-31
- change non-breaking space to regular space
Pull Request resolved: https://github.com/facebook/duckling/pull/282
Reviewed By: chinmay87
Differential Revision: D13551882
Pulled By: patapizza
fbshipit-source-id: e254be1beaed21226741c55f243ac21eaa06d636
Summary:
+ based on https://stackoverflow.com/a/51671356/630160 I have implemented:
- passing in `--port=8080`
- or setting PORT=8080 as environment variable
where `default < PORT < --port`, i.e. a --port parameter overrides both an environment variable and a default value, and an environment variable PORT overrides the default value.
+ change small hlint: `fromMaybe def . fmap f = `maybe def f`
Pull Request resolved: https://github.com/facebook/duckling/pull/281
Differential Revision: D13388735
Pulled By: patapizza
fbshipit-source-id: cbc4a819036dbec474526b862b0f6187f02b6155
Summary: This will allow other modules to import the defined Time rules without redefining it.
Reviewed By: patapizza
Differential Revision: D13320380
fbshipit-source-id: e6fc7214e282de279974e14ad01e9c5b9c8c0986
Summary: This update adds support for credit card numbers that contain dashes, at least for the issuer specific regular expressions.
Reviewed By: patapizza
Differential Revision: D13105871
fbshipit-source-id: 36130d2c7c53efc837ff61d7037761987660901c
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:
Fixes [#218](https://github.com/facebook/duckling/issues/218)
**Note:** This is still a work in progress. But, I'm new to both Haskell and this repo and I seem to be stuck. Would appreciate feedback on what I've done so far. Thank you!
Pull Request resolved: https://github.com/facebook/duckling/pull/271
Reviewed By: chinmay87
Differential Revision: D13087476
Pulled By: patapizza
fbshipit-source-id: 2dee0d023794265bd791ae0bbc0e2e2b89ea1959
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: Support intervals for Duckling AmountOfMoney KO
Reviewed By: haoxuany
Differential Revision: D13020692
fbshipit-source-id: 79e1d99acf317467c1b06b156f47a497c91062da
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:
The common phrase "i dag kl 15" (today at 15:00) will now be recognized with the correct time.
So far duckling has expected the 'kl' to be written as 'kl.'.
Before this pull
`$ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=da_DK&text=i dag kl 15'`
Time is 00:00:00:
```
[{"body":"i dag","start":0,"value":{"values":[{"value":"2018-10-18T00:00:00.000-07:00","grain":"day","type":"value"}],
**"value":"2018-10-18T00:00:00.000-07:00",**
"grain":"day","type":"value"},"end":5,"dim":"time","latent":false},{"body":"15","start":9,"value":{"value":15,"type":"value"},"end":11,"dim":"number","latent":false}]
```
`$ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=da_DK&text=i dag kl. 15'`
Time is 15:00:00:
```
[{"body":"i dag kl. 15","start":0,"value":{"values":[{"value":"2018-10-18T15:00:00.000-07:00","grain":"hour","type":"value"}],
"value":"2018-10-18T15:00:00.000-07:00",
"grain":"hour","type":"value"},"end":12,"dim":"time","latent":false}]
```
After this pull:
`$ curl -XPOST http://0.0.0.0:8000/parse --data 'locale=da_DK&text=i dag kl 15'`
Time is 15:00:00
```
[{"body":"i dag kl 15","start":0,"value":{"values":[{"value":"2018-10-18T15:00:00.000-07:00","grain":"hour","type":"value"}],
"value":"2018-10-18T15:00:00.000-07:00",
"grain":"hour","type":"value"},"end":11,"dim":"time","latent":false}]
```
Pull Request resolved: https://github.com/facebook/duckling/pull/267
Reviewed By: chinmay87
Differential Revision: D10489441
Pulled By: patapizza
fbshipit-source-id: ae574a7057be3adbb29ee1cb0659d4e5afa896e8
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