1 #ifndef __VC_REGEX_RULE_H
2 #define __VC_REGEX_RULE_H
4 #define MAX_NUM_REGEX 12
15 //at noon / at midnight
16 const char *TIME_PHR_REGEX[2] = {"(정오)|(자정)",
17 "( at noon)|( at midnight)"};
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])분|반",
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?"};
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 "(이틀)|(사흘)|(나흘)|(닷새)|(엿새)|(이레)|(여드레)|(아흐레)|(열흘)"};
47 //Monday / Tuesday / Wednesday / Thursday / Saturday / Sunday
48 const char *DATE_PHR3_REGEX[2] = {"(월|화|수|목|금|토|일)(요일)?",
49 "(Mon|Tues|Wednes|Thurs|Fri|Satur|Sun)(day)?"};