duckling/Duckling/Dimensions
Ziyang Liu 5460d8df0e Support custom dimensions
Summary:
Support custom dimensions

Had to move the definition of `Dimension` from `Duckling.Dimensions.Types` to `Duckling.Types` to avoid cyclic imports between these two modules.

A sample custom dimension is in `exe/CustomDimensionExample.hs`.

Limitations of custom dimensions:

- All rules for a custom dimension must be in the same module with the definition of the custom dimension. Otherwise there will be cyclic imports, because the definition of the dimension and the rules refer to each other.
- The custom dimension must be specified when using `parse`, since there's no way to get all the existing custom dimensions.

Reviewed By: patapizza

Differential Revision: D7630360

fbshipit-source-id: 30e12dcb33611f5692c4f5949de377bf61b75e1e
2018-04-19 15:30:51 -07:00
..
AR.hs Added Quantity Dimension to Arabic language 2017-12-20 18:00:43 -08:00
BG.hs Added TimeGrain, Duration, and Ordinal 2018-03-19 18:00:29 -07:00
Common.hs Numeral: common rule + supporting hindu-arabic numerals for Burmese 2017-12-06 16:00:28 -08:00
CS.hs added Distance for CZ language 2017-05-12 08:19:20 -07:00
DA.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
DE.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
EL.hs Support for Greek times and dates 2017-12-04 16:45:40 -08:00
EN.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
ES.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
ET.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
FR.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
GA.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
HE.hs HE: Time 2017-04-28 10:04:35 -07:00
HI.hs Added HI Ordinals 2018-02-09 13:15:30 -08:00
HR.hs Temperature for Croatian 2017-04-28 08:04:22 -07:00
HU.hs HU Time, TimeGrain 2017-08-22 19:34:33 -07:00
ID.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
IT.hs Volume for IT lang 2017-05-02 11:19:14 -07:00
JA.hs Remove Time from JA targets 2017-10-30 16:34:24 -07:00
KA.hs georgian numeral support 2017-09-05 12:19:29 -07:00
KO.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
MY.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
NB.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
NE.hs Setup Nepali (NE) and add Numeral dimension 2018-02-13 07:45:31 -08:00
NL.hs Support Dutch dates and times 2017-10-19 14:04:38 -07:00
PL.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
PT.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
RO.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
RU.hs Added TimeGrain and Duration Dimensions to Russian language 2017-11-15 10:45:24 -08:00
SV.hs Add distance to SV 2018-04-05 16:00:33 -07:00
TA.hs Support Tamil numerals 2018-03-19 16:45:36 -07:00
TR.hs Volume for TR 2017-06-02 12:49:20 -07:00
Types.hs Support custom dimensions 2018-04-19 15:30:51 -07:00
UK.hs Move onto dependent-sum instead of custom local data Some 2017-03-15 10:34:17 -07:00
VI.hs VI: Time 2017-04-28 08:04:21 -07:00
ZH.hs Add ZH distance support 2018-03-21 12:15:28 -07:00