-
Notifications
You must be signed in to change notification settings - Fork 0
/
duckling.h
81 lines (44 loc) · 2.11 KB
/
duckling.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include <stdbool.h>
//// Initializion/Shutdown
bool ducklingInit();
void ducklingExit();
void ducklingFreeString(char *string);
void ducklingFreeObject(void *object);
//// Dimension
typedef void *DucklingDimensionPtr;
DucklingDimensionPtr ducklingParseDimension(char *dimension);
char *ducklingGetDimensionName(DucklingDimensionPtr dimension);
DucklingDimensionPtr ducklingGetBuiltinDimensionCreditCardNumber();
DucklingDimensionPtr ducklingGetBuiltinDimensionDistance();
DucklingDimensionPtr ducklingGetBuiltinDimensionDuration();
DucklingDimensionPtr ducklingGetBuiltinDimensionEmail();
DucklingDimensionPtr ducklingGetBuiltinDimensionAmountOfMoney();
DucklingDimensionPtr ducklingGetBuiltinDimensionNumeral();
DucklingDimensionPtr ducklingGetBuiltinDimensionOrdinal();
DucklingDimensionPtr ducklingGetBuiltinDimensionPhoneNumber();
DucklingDimensionPtr ducklingGetBuiltinDimensionQuantity();
DucklingDimensionPtr ducklingGetBuiltinDimensionTemperature();
DucklingDimensionPtr ducklingGetBuiltinDimensionTime();
DucklingDimensionPtr ducklingGetBuiltinDimensionUrl();
DucklingDimensionPtr ducklingGetBuiltinDimensionVolume();
//// Lang
typedef void *DucklingLangPtr;
DucklingLangPtr ducklingParseLang(char *lang);
//// Region
typedef void *DucklingRegionPtr;
DucklingRegionPtr ducklingParseRegion(char *region);
//// Locale
typedef void *DucklingLocalePtr;
DucklingLocalePtr ducklingMakeLocale(DucklingLangPtr lang, DucklingRegionPtr region);
//// TimeZoneSeriesMap
typedef void *DucklingTimeZoneSeriesMapPtr;
DucklingTimeZoneSeriesMapPtr ducklingLoadTimeZoneSeriesMap(char *base);
//// TimeZoneSeries
typedef void *DucklingTimeZoneSeriesPtr;
DucklingTimeZoneSeriesPtr ducklingGetTimeZoneSeries(DucklingTimeZoneSeriesMapPtr timeZoneSeriesMap, char *name);
//// Time
typedef void *DucklingTimePtr;
DucklingTimePtr ducklingGetCurrentTime(DucklingTimeZoneSeriesPtr timeZoneSeries);
DucklingTimePtr ducklingMakeTime(double timestamp, DucklingTimeZoneSeriesPtr timeZoneSeries);
//// Parse
char *ducklingParseText(char *text, DucklingTimePtr time, DucklingLocalePtr locale, bool latent, DucklingDimensionPtr dimensions[]);