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
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
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
Summary: Improve support for amount of money in Hebrew
Reviewed By: patapizza
Differential Revision: D13685915
fbshipit-source-id: f9796f52b4d011bdc5e1ef903d5e3dc789bfcd04
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:
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: 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: 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:
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
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