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:
Adding . in between kilogram units used to be extracted as a Numeral
instead of Quantity.
Pull Request resolved: https://github.com/facebook/duckling/pull/570
Reviewed By: patapizza
Differential Revision: D26199687
Pulled By: chessai
fbshipit-source-id: 65e39f20296946d5762d7180b12878f4e66ea701
Summary:
In general there are some clashes between time formats `hhmm` and date formats `ddmm`. For example, depending on context, `22.10` can mean clock time ten past ten or the twenty second of october. In general it's correct to interpret this as clock time, as Duckling currently does.
But there are some cases not currently covered by Duckling where we have more unambiguous dates, e.g. `12.03.2018` and `27.11`. These are included here (in addition to midnight `24:00` which was also missing).
#### Changes:
- Bug in `ruleDdmm` regex meant that dates on the format `dd/mm` where `mm > 9` were not parsed
- `ruleYyyymmdd` now also parses dots and forward slashes, i.e. `2012.05.14` and `2012/05/14`
- New rule `rule2400` parses `24:00` and `24.00` (I elected not to include it in `ruleMidnighteodendOfDay` as it has grain minute rather than day)
- New rule `ruleDmm` parses `1/10`, `9.12` etc
- New rule `ruleDDm` parses `10/3`, `11.1` etc
- New rule `ruleDdDotMm` parses `25.02`, `31.10` etc
- `ruleDdmmyyyy` now also parses dots, i.e. `03.10.1983`
- New tests
Pull Request resolved: https://github.com/facebook/duckling/pull/395
Reviewed By: patapizza
Differential Revision: D26193069
Pulled By: chessai
fbshipit-source-id: cf711807fa1d40be2303f2426d74ded40c2e23b3
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: adds a new rule that parses year intervals such as "1960 - 1961". see inline comments for heuristics.
Reviewed By: patapizza
Differential Revision: D25840835
fbshipit-source-id: 851a5b1c78440cbf065bf9f20a05c78d4967ea3c
Summary: adds a rule for 'the day after tomorrow' in Romanian. regenerates classifiers.
Reviewed By: girifb
Differential Revision: D26155042
fbshipit-source-id: 80005ab94a10f9fbf242c9a712bd040e4f6bc477
Summary:
**2nd set of changes from pull request https://github.com/facebook/duckling/issues/516
Supporting Cantonese and more common expressions in Chinese.
Adding rules file for Duration/ZH.
Pull Request resolved: https://github.com/facebook/duckling/pull/523
Reviewed By: haoxuany
Differential Revision: D23428901
Pulled By: chessai
fbshipit-source-id: 6d04c97b63bac966eb61d77cab2f08f7543dbbf0
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:
* "at the moment" is considered identical to "now".
* "ASAP" is considered identical to "from now"
Pull Request resolved: https://github.com/facebook/duckling/pull/405
Reviewed By: patapizza
Differential Revision: D26009483
Pulled By: chessai
fbshipit-source-id: addf4c509e69d413cae279601c64f72710eba11f
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:
'miej' in Polish is the imperative form of the verb 'mieć' (to have). "mniej więcej" means "more or less" and it was the intention here.
Pull Request resolved: https://github.com/facebook/duckling/pull/426
Reviewed By: patapizza, girifb
Differential Revision: D25546380
Pulled By: chessai
fbshipit-source-id: 1047b83109cab917f1f4dbe87b667f8ccd2fb92d
Summary:
Improves the recognition of German time approximation language and removes a single error in the rule of <time-of-day> approximately.
Pull Request resolved: https://github.com/facebook/duckling/pull/435
Reviewed By: patapizza
Differential Revision: D24934281
Pulled By: chessai
fbshipit-source-id: 641bcb6a7e5c26e66c735fe13bccae9b7a8909ae
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:
Spanish (ES) will now have all the same quantity rules as English (EN) (which I think is the most-supported language), plus more.
This includes the following:
* bowls - (bol(es)?|tazón(es)?|cuencos?|platos? (soperos?)|(hondos?)) (EN does not currently have this)
* cups - (tazas?)
* dishes - (platos?|fuentes?) (EN does not currently have this)
* grams - (((m(ili)?)|(k(ilo)?))?g(ramo)?s?)
* ounces - ((onzas?)|oz)
* pints - (pintas?) (EN does not currently have this)
* pounds - ((lb|libra)s?)
* quarts - (cuartos? de galón) (EN does not currently have this)
* tablespoons - (cucharadas? (grande)?) (EN does not currently have this)
* teaspoons - (cucharaditas?) (EN does not currently have this)
Reviewed By: patapizza
Differential Revision: D24628214
fbshipit-source-id: 2e8d500661f30fa0928cb7d3f21470afc01e2285
Summary:
Pull Request resolved: https://github.com/facebook/duckling/pull/533
In recent versions of Data.Some the name of the constructor, `This` has changed name to `Some`. This has become rather problematic for us to migrate so we're just going to remove the dependency. The meat of this diff is adding the type `Seal` to `Duckling.Types`. That type replaces `Some`.
Reviewed By: pepeiborra
Differential Revision: D23929459
fbshipit-source-id: 8ff4146ecba4f1119a17899961b2d877547f6e4f
Summary:
"so" is an adverb in German: https://github.com/wit-ai/wit/issues/1860
It's also a short form for "Sonntag" (Sunday); making the dot mandatory.
Reviewed By: haoxuany
Differential Revision: D22900791
fbshipit-source-id: 8dc873f79a21ca2add074f9c664e84fae56f1e67
Summary: Currently the term "coming" is being treated the same way as "this" or "current". The expected treatment should be the same as the term "next".
Reviewed By: chinmay87
Differential Revision: D22435156
fbshipit-source-id: b0b20d8a38014267fb7d037b685ce126f602bda7
Summary:
Current:
"seis cero cinco pm" [dimension Time] -> "cero cinco pm" or "5 pm"
here the term "seis" was dropped because it was treated as "6" in "Numeral" dimension.
Expected:
"seis cero cinco pm" -> "6:05 pm"
The root cause was that the rule "<hour-of-day> <integer> (as relative minutes)" dropped the first term "hour-of-day" if it was parsed as a latent token.
Reviewed By: chinmay87
Differential Revision: D22553028
fbshipit-source-id: abc92bb369c23d2b3084641eab2a2dabb87dbc66
Summary:
There are two rules for parsing "manana" (dimension: Time): one is resolved to "morning"; while the other is resolved to "tomorrow". And the first (or "morning") rule resolves to a LATENT result; while the second (or "tomorrow") rule resolves to a NON-LATENT result.
If the duckling is called with "latent" option turned off, the "tomorrow" rule prevails. However, if the duckling is invoked with "latent" option turned on, the "morning" rule is preferred.
The solution (for now) is to steer the classifier towards "tomorrow" rule by adding large number of (same) examples for "tomorrow" rule.
Reviewed By: chinmay87
Differential Revision: D22425277
fbshipit-source-id: 2f139eec0c38b9b5227f27d9f09f6264e7cf86cd
Summary:
The root cause is this lacking of support for the composition of numerals in ES.
For example, "mil novecientos noventa" is parsed 3 individual numbers: 1000, 900 and 90 correspondingly. Instead, the expected result is a single numeral value that is the sum of aforementioned three numbers. The same expection can be extended to the composition with arbitrary number of numeral values.
Reviewed By: chinmay87
Differential Revision: D22192034
fbshipit-source-id: 476489145b83297b82d88f3451020c867e2d08aa
Summary:
Current:
"first monday of last month" -> the date of first monday starting from current time. Note here the term "last month" is dropped
Expected:
"first monday of last month" -> the date of first monday of previous month.
Reviewed By: chinmay87
Differential Revision: D22300243
fbshipit-source-id: 16622860c52ec2ce9c7a7bcd6094192255aa5a0b