Summary: Pull Request resolved: https://github.com/facebook/duckling/pull/682
Test Plan:
CI tests look clean.
As for the German language, I got a friend to double check and the code + test case look good (see Github comment)
Reviewed By: girifb
Differential Revision: D34248572
Pulled By: stroxler
fbshipit-source-id: a031a07808f9aaab142aa365d012035e277676ca
Summary:
* as title
* refactored `numberBetween` to be a `Predicate`
Reviewed By: nishsinghal20
Differential Revision: D34180649
fbshipit-source-id: 8fbe6db83e8b22181bd0bbde533e2d3390d24c75
Summary:
add ruleLeadingDotNumeral which parses "punto 2" and "coma 2" as 0.2, and allow "coma" in ruleNumeralDotNumeral.
Also extend ruleNumeralsPrefixWithNegativeOrMinus to include 'negativo' prefixes
Reviewed By: stroxler
Differential Revision: D29405886
fbshipit-source-id: eb43f6f72374430af414e0d29009b98df2115a31
Summary:
In ES (Spanish), decimals can be expressed by `<number> con <number>`, where the whole part is to the left and the decimal part is to the right.
Resolves#615
Reviewed By: stroxler
Differential Revision: D28449722
fbshipit-source-id: caa0fb52f72f94c4a4cc456a46c25fa5f3b9b625
Summary:
Support numerals like "forty-five (45)". Commonly seen in legal documents.
There are no classifiers to regenerate.
Resolves#216
Reviewed By: stroxler
Differential Revision: D28305725
fbshipit-source-id: b9b4e160f630ce3cf462fcf9f2e575738463c313
Summary:
This commit extend Spanish-language support for concatenations
of the form "<higher-order-of-magnitude> <lower>", e.g.
"doscientos tres" (203) or "cuatro mil ventiuno" (4022) to work
not just for hundreds but also for thousands and millions.
Reviewed By: chessai
Differential Revision: D27858133
fbshipit-source-id: 5c6b227ae7dad9009cd636e7ea49c209480c931a
Summary:
This commit adds two things to Spanish numeral support:
- support for millions
- support, via hooking into the `isMultipliable` logic used by EN, for
composing counts of 2-999 with either "mil" or "millones", which is
the standard way to say things like "tres mil" = 3000
Reviewed By: chessai
Differential Revision: D27858135
fbshipit-source-id: 980e95bd989f818c5ceaa2bb6c87fe81d3e08366
Summary:
This diff refactors our handling of "<hundreds> 0..99" numbers
to be more flexible by replacing `ruleNumeralthreePartHundreds`
with
- a rule for two-part hundreds like "dos cientos" (which is technically
incorrect grammar - doscientos is correct - but probably worth keeping) based
on a notion of multipliability like that used in EN rules
- a rule stating that we can compose hundreds with 0..99 additively
The resulting rules are more flexible, and they correctly parse not only
gramatically iffy phrases like "dos cientos tres", but also grammatically
correct phrases like "doscientos tres". This fixes#380.
Reviewed By: chessai
Differential Revision: D27858136
fbshipit-source-id: 4a918d84d93ac074f83f6947a8f80cfd11145115
Summary:
Whle looking into fixing https://github.com/facebook/duckling/issues/380
I was having a bit of trouble navigating the existing rules and guessing
what is / is not supported.
This diff refactors the Numeral/ES code to be easier to navigate:
- rename all the `ruleNumeral{1,2,3,4,5,6}` rules to be descriptive
- changes the order to be themed from small to large numbers, and
make sure the order of defines matches the order of rules at the end
of the module
- use [20 .. 90] instead of manually specifying the same list out-of-order
Reviewed By: chessai
Differential Revision: D27858134
fbshipit-source-id: b13983d75b36bb4e2b387ef06fe61066d81ae19a
Summary:
The Dutch numeral and ordinal rules contained a spelling mistake: [‘achttien’](https://en.wiktionary.org/wiki/achttien) (18) was spelt as ‘achtien’ (note the single *t*).
This PR fixes this spelling mistake everywhere in the code base.
Pull Request resolved: https://github.com/facebook/duckling/pull/602
Reviewed By: patapizza
Differential Revision: D27859001
Pulled By: chessai
fbshipit-source-id: 8da0d8b099d49cf6207d4066cee1fc7da68a418e
Summary:
While looking at bugfixes for some ES and IT numeral parsing, I was
looking at the Helpers.hs module and figured I'd silence some lint
errors. There are still some name-masking lint issues, but all others
have been fixed.
Reviewed By: chessai
Differential Revision: D27854164
fbshipit-source-id: 5be8d924b033a55608c455074df1c80c8c0019be
Summary: Adds Catalan language and Numeral rules for it
Reviewed By: haoxuany
Differential Revision: D26518604
Pulled By: chessai
fbshipit-source-id: e6b4b0ceb9b7931d086c732dd03fb5cbbe062d5b
Summary: There are a handful of more spelling for russian numbers [20, 30 .. 90] that we aren't handling. Additionally, we optimise for recall over precision by allowing some invalid spellings that could be understandable typos.
Reviewed By: patapizza
Differential Revision: D26285711
Pulled By: chessai
fbshipit-source-id: fd8a8f373d228a526e79b22326eff48bb966310d
Summary:
Currently values like 1000.000 (in Dutch . is thousand separator) are not recognised, as the ruleDecimalWithThousandsSeparator requires the decimal part (e.g. 1000.000,34) to be present. This PR adds some data and changes the ruleDecimalWithThousandsSeparator to make the decimal part optional.
Pull Request resolved: https://github.com/facebook/duckling/pull/504
Reviewed By: patapizza, girifb
Differential Revision: D26078885
Pulled By: chessai
fbshipit-source-id: b1679c713e1d17a168d34a3cc556b6c36a571d75
Summary:
**1st set of changes from pull request https://github.com/facebook/duckling/issues/516
Supporting more common expressions, such as fraction, half, dozen, in Chinese.
Pull Request resolved: https://github.com/facebook/duckling/pull/522
Reviewed By: patapizza
Differential Revision: D23428893
Pulled By: chessai
fbshipit-source-id: 3454ac70a4bfff90dc282560916a0fae9969f521
Summary:
This pull request is to add support for Telugu language (Numerical Dimension) to Duckling
Pull Request resolved: https://github.com/facebook/duckling/pull/470
Differential Revision: D25546700
Pulled By: chessai
fbshipit-source-id: 1d88ee27da8a577a4a79ff31be8cb55ed6444c4e
Summary:
Egyptian Arabic is a dialect of Arabic that is mostly a spoken language that is used in everyday communications.
This PR adds new locale to Arabic to support the differences between Modern Standard Arabic (MSA) and Egyptian Arabic (EG).
I have mainly depended on the different locales of Spanish that are supported by Duckling to create the new Egyptian Arabic locale.
New modifications are added to the `Numeral` dimension since I didn't spot differences in other dimensions.
Pull Request resolved: https://github.com/facebook/duckling/pull/554
Reviewed By: patapizza
Differential Revision: D25543502
Pulled By: chessai
fbshipit-source-id: 4cbb7be78a52071c8681380077f0b4dc033a60de
Summary:
Crore (1e7) and Lakh (1e5) are both commonly used to describe an amount of Indian currency. Common abbreviations are "Cr" (Crore) and "lkh", "L", "lac" (lakh).
Additionally, common spellings of "crore" include "karor" and "koti"
Reviewed By: patapizza
Differential Revision: D25550546
fbshipit-source-id: 0c1479d9027431cb0d1182b5117eabca6f939cb2
Summary:
Add support for additional Hindi numbers like 300, 81, 150, 1000, 1520. These are not supported in the current master version.
Pull Request resolved: https://github.com/facebook/duckling/pull/552
Reviewed By: ashwinp-fb, girifb
Differential Revision: D25072230
Pulled By: chessai
fbshipit-source-id: 35277a2349384bcf44a20e74852113f5c010e618
Summary:
Found a lacking frequent duration in German and a small typo in the existing one.
Pull Request resolved: https://github.com/facebook/duckling/pull/509
Reviewed By: patapizza
Differential Revision: D24690104
Pulled By: chessai
fbshipit-source-id: b49a7a636abf5b92f2fe7c0d5b2ca2fe64acbaa2
Summary:
There are two types of ES phrases for timestamp to support:
1. "para las seis cero dos pm"
2. "para las 6 0 2 pm"
The solution is to:
1. added a new rule to parse two-digit number between 1 and 9 (inclusive);
2. modified the regex pattern to support additional optional phrase "para" in front of "las".
Reviewed By: chinmay87
Differential Revision: D22218800
fbshipit-source-id: 58f692beb6f10834c0ab639b31bf239bf4a1970e
Summary:
The root cause was the error in parsing the ES numeral value [1-9] that spelled with two words instead of one.
For example "cero dos" should be parsed the as "dos". Currently it's being as two numeral values: 0 and 3.
Reviewed By: chinmay87
Differential Revision: D22162804
fbshipit-source-id: 949956935a21e742f6788e7afa788ff728dd9a8d
Summary:
Adding locale rules for ES Numeral because Spain use "," as decimal but south american country use "." as decimal.
Wiki: https://en.wikipedia.org/wiki/Decimal_separator
Reviewed By: haoxuany
Differential Revision: D20040111
fbshipit-source-id: e2a4bfc2928df19976ef98e90ee82e7d21b52313
Summary:
- Setup Afrikaans (AF) language
- Added Numeral Dimension
Some of the paths have changed, and some extra files were necessary, after
basing initial work off 24d3f19976
I followed some of the Numeral examples from Dutch as well as Hungarian,
since Afrikaans and Dutch have some similarities.
One thing was examples for numbers having the number as an example, which I
didn't do here, because I'm not sure it's necessary.
Pull Request resolved: https://github.com/facebook/duckling/pull/422
Reviewed By: awalterschulze
Differential Revision: D18348617
Pulled By: patapizza
fbshipit-source-id: b8c4218629c264b48d6f2cecc4c23e2e281a64da
Summary:
Hello,
I am new to Haskell, but I would like to add Thai language (TH) to Duckling.
I have tried to extended Duckling by adding Numeral dimension for new language TH.
Please have a look at it and see what we can improve.
Thanks!
Pull Request resolved: https://github.com/facebook/duckling/pull/399
Reviewed By: patapizza
Differential Revision: D17651508
Pulled By: haoxuany
fbshipit-source-id: 4b3ee1352f239eee637958f5e9dce68430352a0a
Summary: Adding support for decimal numbers written in Arabic script.
Reviewed By: patapizza
Differential Revision: D14700060
fbshipit-source-id: 3261c36dde17dc9e589eac6b6521da6dece814f2
Summary: Adding support for Arabic numbers written in Arabic script.
Reviewed By: patapizza
Differential Revision: D14697405
fbshipit-source-id: 1162319afda55bdfdcb132932fa7e3a99fdcda15
Summary:
- Improved understanding of past periods and dates which include days, months and years.
- Added support for quarters.
- Fixed unnecessary two or more results on some queries.
Pull Request resolved: https://github.com/facebook/duckling/pull/299
Differential Revision: D13878236
Pulled By: patapizza
fbshipit-source-id: 5ae4ac96dd5d75f54ed1567017a81e5a9c8bcc83
Summary:
This seems to have existed earlier but have been removed. The correct spelling seems to be with the accent though.
Pull Request resolved: https://github.com/facebook/duckling/pull/325
Differential Revision: D14059697
Pulled By: patapizza
fbshipit-source-id: 7c2aafc555a31bff8962032613b8a1da0edc8dc9
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:
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:
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