Fix spelling errata
[platform/core/uifw/voice-control.git] / common / vc_regex_rule.h
1 #ifndef __VC_REGEX_RULE_H
2 #define __VC_REGEX_RULE_H
3
4 #define MAX_NUM_REGEX 12
5
6 #include <string.h>
7 #include <time.h>
8 #include <regex.h>
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14
15 //at noon / at midnight
16 const char *TIME_PHR_REGEX[2] = {"(정오)|(자정)",
17                                 "( at noon)|( at midnight)"};
18 //morning / afternoon
19 const char *TIME_ABS1_REGEX[2] = {"(오후)|(오전)|(저녁)|(아침)",
20                                 "([0-9] p.?m.?)|([0-9] a.?m.?)|( afternoon)|( morning)"};
21 //hh:mm / :mm / hh o'clock / pm / am
22 const char *TIME_ABS2_REGEX[2] = {"([1-9]|1[0-9]|2[0-4])시",
23                                 " at ([1-9]|1[0-9]|2[0-4])( o'clock|:| pm| p.m.| am| a.m.|$)"};
24 const char *TIME_ABS3_REGEX[2] = {"([1-9]|[1-5][0-9])분|반",
25                                 ":([0-5][0-9])"};
26 //hh hour(s) mm minute(s) (after / later) / hh hour(s) (after / later) / mm minute(s) (after / later)
27 const char *TIME_REL1_REGEX[2] = {"(시간|분).*[^오](뒤|후|있다가)",
28                                 " after([^a-zA-Z]|$)| later([^a-zA-Z]|$)| in [0-9]+ (minute|hour)"};
29 const char *TIME_REL2_REGEX[2] = {"([1-9][0-9]*)시간",
30                                 "([1-9][0-9]*) hours?"};
31 const char *TIME_REL3_REGEX[2] = {"([1-9][0-9]*)분",
32                                 "([1-9][0-9]*) minutes?"};
33
34 //day month, year / day month / day
35 const char *DATE_ABS1_REGEX[2] = {"(([1-2][0-9]{3})년)",
36                                 "(st|nd|rd|th),? ([1-2][0-9]{3})"};
37 const char *DATE_ABS2_REGEX[2] = {"(1월)|(2월)|(3월)|(4월)|(5월)|(6월)|(7월)|(8월)|(9월)|(10월)|(11월)|(12월)",
38                                 "(January)|(February)|(March)|(April)|(May)|(June)|(July)|(August)|(September)|(October)|(November)|(December)"};
39 const char *DATE_ABS3_REGEX[2] = {"([1-9]|[1-2][0-9]|3[0-1])일",
40                                 "([1-9]|[1-2][0-9]|3[0-1])(st|nd|rd|th)"};
41 //today / tomorrow / the day after tomorrow
42 const char *DATE_PHR1_REGEX[2] = {"(오늘)|(내일)|(모레)|(글피)",
43                                 "(today)|(tomorrow)|(the day after tomorrow)"};
44 const char *DATE_PHR2_REGEX[2] = {"(이틀)|(사흘)|(나흘)|(닷새)|(엿새)|(이레)|(여드레)|(아흐레)|(열흘)",
45                                 "(이틀)|(사흘)|(나흘)|(닷새)|(엿새)|(이레)|(여드레)|(아흐레)|(열흘)"};
46
47 //Monday / Tuesday / Wednesday / Thursday / Saturday / Sunday
48 const char *DATE_PHR3_REGEX[2] = {"(월|화|수|목|금|토|일)(요일)?",
49                                 "(Mon|Tues|Wednes|Thurs|Fri|Satur|Sun)(day)?"};
50
51
52 #ifdef __cplusplus
53 }
54 #endif
55
56
57 #endif