Commit Graph

23 Commits

Author SHA1 Message Date
mustafaalp43@gmail.com
56fd7b0aaf Feature/Turkish money (#579)
Summary:
Added amount of money dimension for Turkish language
Pull Request resolved: https://github.com/facebook/duckling/pull/579

Test Plan: :test Endpoint.Duckling.Test

Reviewed By: haoxuany, bugra

Differential Revision: D27017300

Pulled By: chessai

fbshipit-source-id: e8cb257a2953675f54269ed358948e8cbe38af7b
2021-03-17 10:35:00 -07:00
kcnhk1@gmail.com
776b1ec64d extend AmountOfMoney rules
Summary:
Add rules:
- `hkd` as HKD, and related rules (prefix and suffix)
- dollar and <amount-of-money> rule
- dollar and a half rule
- intersection for <amount-of-money> and `a half`

Changed:
- dime and dollar rules now have improved coverage

Reviewed By: girifb

Differential Revision: D26191724

Pulled By: chessai

fbshipit-source-id: bf63b6eaa751fb96dcf341fa2b66db06a6eeca79
2021-02-03 14:05:30 -08:00
Igor Kuzmenko
9993911e3b Adds UAH currency Type and examples to EN and RU Corpus (#433)
Summary:
This PR adds UAH currency Type and examples to EN and RU Corpus

Pull Request resolved: https://github.com/facebook/duckling/pull/433

Reviewed By: girifb

Differential Revision: D25102990

Pulled By: chessai

fbshipit-source-id: ed40e8dfcf145a65c7e6d87158da0efacb32e256
2021-02-01 14:32:24 -08:00
Julien Odent
bf89e34365 Relicense to BSD3
Reviewed By: JoelMarcey

Differential Revision: D15439223

fbshipit-source-id: c5af3cb06318748142fe503945b38beffadfc28a
2019-05-22 10:46:39 -07:00
Tom Milligan
81c32e465a AmountOfMoney: match three letter currency codes beginning with C (#327)
Summary:
Closes #326

All three letter currency codes beginning with the letter `C` are missed by the `currencies` regex. The regex will match `c` (meaning `cents`) and return, so `CAD`, `CHF` and `CNY` will never be matched.

This PR adds tests for all three failing currencies, and corrects the regex.
Pull Request resolved: https://github.com/facebook/duckling/pull/327

Differential Revision: D14540169

Pulled By: patapizza

fbshipit-source-id: a909cb452cd9e9f00aa64d1c6458dcbc415f85b9
2019-03-20 08:46:59 -07:00
Micha Molko
301f74ea2e AmountOfMoney/HE Extend support
Summary: Improve support for amount of money in Hebrew

Reviewed By: patapizza

Differential Revision: D13685915

fbshipit-source-id: f9796f52b4d011bdc5e1ef903d5e3dc789bfcd04
2019-02-06 02:32:24 -08:00
uugan
69ffb0f39d Mongolian (#277)
Summary:
MN Setup+Numeral
Pull Request resolved: https://github.com/facebook/duckling/pull/277

Reviewed By: chinmay87

Differential Revision: D13028169

Pulled By: patapizza

fbshipit-source-id: 7d587300918b3ed6211b6ce4147350147b4dc89e
2018-11-26 15:31:08 -08:00
Albert Morgese
2ace5d474b AmountOfMoney/EN: Add basic latent support
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
2018-09-12 15:30:58 -07:00
jfulse
d5639056f3 Norwegian currencies (#244)
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
2018-09-06 21:00:57 -07:00
David Magaltadze
ab3b789896 KA AmountOfMoney (#245)
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
2018-08-28 17:00:50 -07:00
RIAN DOUGLAS
884904b5ca Implement handling of "grand" for EN_?? locales
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
2018-05-17 15:45:27 -07:00
RIAN DOUGLAS
963aa6b465 Implement handling of "grand" for Ca and GB
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
2018-05-09 14:46:16 -07:00
Aaron Yue
4df76289bc Implement AmountOfMoney
Summary: implement AmountOfMoney rules and corpus for ZH

Reviewed By: patapizza

Differential Revision: D7508507

fbshipit-source-id: 3591b399a9880c5278587979c6576720343cc123
2018-04-17 16:45:32 -07:00
Aaron Yue
e542ff5b50 Distribute ruleUnitAmount to all languages
Summary:
enforce units are checked in ruleUnitAmount and ruleAmountUnit, and distribute ruleUnitAmount to all
languages, since in some languages this doesn't work (such as for ZH, where value units must succeed amounts)

Reviewed By: patapizza

Differential Revision: D7509840

fbshipit-source-id: 3a79b39721850f9d0289442925fbc02cf69abefb
2018-04-05 10:45:35 -07:00
Julien Odent
b00fa512af AmountOfMoney: fixes
Summary:
* don't recursively compose cents
* don't allow decreasing ranges

Reviewed By: blandinw

Differential Revision: D6849132

fbshipit-source-id: ed6ca30388642c21e677a628971747a4fb3dfbef
2018-01-30 14:45:36 -08:00
Julien Odent
bef7a44fa8 Remove redundant brackets and language pragmas
Summary: .

Reviewed By: JonCoens

Differential Revision: D6838082

fbshipit-source-id: 94757bdb80c6d3c29a7a6554429940a1b7403108
2018-01-29 16:45:28 -08:00
Abdallatif Sulaiman
89822776c6 Added Amount of Money Dimension to Arabic language
Summary: Closes https://github.com/facebook/duckling/pull/134

Reviewed By: JonCoens

Differential Revision: D6649920

Pulled By: patapizza

fbshipit-source-id: 9c647c84f5ae4f3dc26cb0c7aa74abb097ea001a
2018-01-02 14:00:51 -08:00
Zahar Shimanchik
2274e40369 Added AmountOfMoney Dimension to Russian language
Summary: Closes https://github.com/facebook/duckling/pull/120

Reviewed By: patapizza

Differential Revision: D6520302

Pulled By: panagosg7

fbshipit-source-id: 2c9ac6e15ca3ee90b2bf5911ee62835966fcacd1
2017-12-12 12:15:30 -08:00
Julien Odent
83ea150d94 Convert back escaped characters in rules
Summary:
We noticed that using UTF-8 characters directly in regexes work.
Hence converting back the escaped characters for readability and maintenance.

Reviewed By: blandinw

Differential Revision: D5787146

fbshipit-source-id: e5a4b9a
2017-09-07 12:49:33 -07:00
Veselin Stoyanov
e9b1c8932a Added AmountOfMoney dimension to Bulgarian language
Summary:
- Added AmountOfMoney dimension to Bulgarian language
Closes https://github.com/facebookincubator/duckling/pull/80

Reviewed By: JonCoens

Differential Revision: D5606699

Pulled By: patapizza

fbshipit-source-id: c18f5d4
2017-08-14 09:34:36 -07:00
hongwui
c6c1330ed5 Add myr
Summary:
Add MYR(Malaysia currency) into amountOfMoney in EN.
Closes https://github.com/facebookincubator/duckling/pull/40

Reviewed By: blandinw

Differential Revision: D5218026

Pulled By: patapizza

fbshipit-source-id: 5fd179e
2017-06-09 19:49:16 -07:00
Julien Odent
b32696f8eb AmountOfMoney
Summary: AmountOfMoney dimension for Croatian.

Reviewed By: niteria

Differential Revision: D4947584

fbshipit-source-id: a20670a
2017-04-26 09:19:27 -07:00
Julien Odent
e76cee3a6d Rename Finance to AmountOfMoney
Summary: Because it makes more sense.

Reviewed By: JonCoens

Differential Revision: D4721646

fbshipit-source-id: 449bfb4
2017-03-16 14:49:44 -07:00