Summary: Support more words in rule `ruleDurationNumeralMore`
Reviewed By: patapizza
Differential Revision: D15501197
fbshipit-source-id: feb12cd27dfb964e1e404b1d902828000c9fa4f7
Summary:
May 2019 is more often written like' 2019年5月' than ' 2019年五月' so the corresponding integer are added in the regex's rule ruleMonths.
Pull Request resolved: https://github.com/facebook/duckling/pull/301
Reviewed By: haoxuany
Differential Revision: D13606127
Pulled By: patapizza
fbshipit-source-id: 7dd2536e36711b4be42a93419b08dbd66cf31523
Summary:
Add the support for periodic holidays in Chinese.
Canonical names of the holidays in Chinese are defined using simplified Chinese since it is used by the majority of the population.
Reviewed By: patapizza
Differential Revision: D8044583
fbshipit-source-id: c3db715b9d8c515c2013ab019012527033a17863
Summary:
generalize chinese digit specifier (十百千万亿) parsing, and add hanzi tests
These digits specifiers can be parsed as (<num><speci>)<num>,
by using the multiplicater value <num><speci>, and a connect function that adds them together
(two cases, skipping digits [which requires a 零 in between], and digits in consecutive locations).
Note that 个 is technically a digit specifier,
but in Chinese it is never used directly as a numeral specifier, and always as a counter.
Reviewed By: zliu41
Differential Revision: D7424249
fbshipit-source-id: 20a85a7df1f908ee9879e92b904178fa26a9a5e5
Summary: Now that years are latent, let's absorb the "in" and make them not latent.
Reviewed By: zliu41
Differential Revision: D7587599
fbshipit-source-id: 61a19ac389244df491591d78c28f0301f9124439
Summary: Make all years latent to prevent any four digit number to be considered a year.
Reviewed By: patapizza
Differential Revision: D7559843
fbshipit-source-id: f3a8625dd7d74edfffb13401278d6b4a5110359a
Summary: remove `ruleLastTuesdayLastJuly`, it does the exact same thing as `ruleLastTime`
Reviewed By: patapizza
Differential Revision: D7445836
fbshipit-source-id: 95667db4ce376223acce0ea36a6a0493946ceea1
Summary:
* Closes PRs #115, #116.
* `Numeral`: Moves `ruleFractions` to common
* `Numeral/PT`: fixes dot in regex
* `Time`: Moves `isNumeralSafeToUse` to `isIntegerBetween` (more robust and cleaner)
* `Time/EN`: refactored `ruleCycleLastNextN` to `ruleDurationLastNext` (so it also accounts for non-safe Numerals, like "in a few days")
Reviewed By: blandinw
Differential Revision: D6502958
fbshipit-source-id: 6d9c08a23dab88f441aadade08d663c8e0da415d
Summary:
* Moving `ruleNationalDay` from `ZH` rules to specific locales: `zh_CN`, `zh_HK`, `zh_MO`
* Fixed National Day for `zh_TW`.
Reviewed By: blandinw
Differential Revision: D6057565
fbshipit-source-id: 8f9f2ab