// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// ------------------------------------------------------------------------------

package com.microsoft.recognizers.text.datetime.resources;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import com.google.common.collect.ImmutableMap;

public class ChineseDateTime {

    public static final String LangMarker = "Chi";

    public static final String MonthRegex = "(?<month>正月|一月|二月|三月|四月|五月|六月|七月|八月|九月|十月|十一月|十二月|01月|02月|03月|04月|05月|06月|07月|08月|09月|10月|11月|12月|1月|2月|3月|4月|5月|6月|7月|8月|9月|大年(?!龄|纪|级))";

    public static final String DayRegex = "(?<day>01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|1|2|3|4|5|6|7|8|9)";

    public static final String OneToNineIntegerRegex = "[一二三四五六七八九壹贰叁肆伍陆柒捌玖]";

    public static final String DateDayRegexInChinese = "(?<day>(([12][0-9]|3[01]|[1-9]|[三叁][十拾][一壹]?|[二贰貳]?[十拾]({OneToNineIntegerRegex})?|{OneToNineIntegerRegex})[日号]|初一|三十))"
            .replace("{OneToNineIntegerRegex}", OneToNineIntegerRegex);

    public static final String DayRegexNumInChinese = "(?<day>[12][0-9]|3[01]|[1-9]|[三叁][十拾][一壹]?|[二贰貳]?[十拾]({OneToNineIntegerRegex})?|{OneToNineIntegerRegex}|廿|卅)"
            .replace("{OneToNineIntegerRegex}", OneToNineIntegerRegex);

    public static final String MonthNumRegex = "(?<month>01|02|03|04|05|06|07|08|09|10|11|12|1|2|3|4|5|6|7|8|9)";

    public static final String TwoNumYear = "50";

    public static final String YearNumRegex = "(?<year>((1[5-9]|20)\\d{2})|2100)";

    public static final String SimpleYearRegex = "(?<year>(\\d{2,4}))";

    public static final String ZeroToNineIntegerRegexChs = "[一二三四五六七八九零壹贰叁肆伍陆柒捌玖〇两千俩倆仨]";

    public static final String DynastyStartYear = "元";

    public static final String RegionTitleRegex = "(贞观|开元|神龙|洪武|建文|永乐|景泰|天顺|成化|嘉靖|万历|崇祯|顺治|康熙|雍正|乾隆|嘉庆|道光|咸丰|同治|光绪|宣统|民国)";

    public static final String DynastyYearRegex = "(?<dynasty>{RegionTitleRegex})(?<biasYear>({DynastyStartYear}|\\d{1,3}|[十拾]?({ZeroToNineIntegerRegexChs}[十百拾佰]?){0,3}))"
            .replace("{RegionTitleRegex}", RegionTitleRegex)
            .replace("{DynastyStartYear}", DynastyStartYear)
            .replace("{ZeroToNineIntegerRegexChs}", ZeroToNineIntegerRegexChs);

    public static final String DateYearInChineseRegex = "(?<yearchs>({ZeroToNineIntegerRegexChs}{ZeroToNineIntegerRegexChs}{ZeroToNineIntegerRegexChs}{ZeroToNineIntegerRegexChs}|{ZeroToNineIntegerRegexChs}{ZeroToNineIntegerRegexChs}|{ZeroToNineIntegerRegexChs}{ZeroToNineIntegerRegexChs}{ZeroToNineIntegerRegexChs}|{DynastyYearRegex}))"
            .replace("{ZeroToNineIntegerRegexChs}", ZeroToNineIntegerRegexChs)
            .replace("{DynastyYearRegex}", DynastyYearRegex);

    public static final String WeekDayRegex = "(?<weekday>周日|周天|周一|周二|周三|周四|周五|周六|星期一|星期二|星期三|星期四|星期五|星期六|星期日|星期天|礼拜一|礼拜二|礼拜三|礼拜四|礼拜五|礼拜六|礼拜日|礼拜天|禮拜一|禮拜二|禮拜三|禮拜四|禮拜五|禮拜六|禮拜日|禮拜天|週日|週天|週一|週二|週三|週四|週五|週六)";

    public static final String LunarRegex = "(农历|初一|正月|大年(?!龄|纪|级))";

    public static final String DateThisRegex = "(这个|这一个|这|这一|本){WeekDayRegex}"
            .replace("{WeekDayRegex}", WeekDayRegex);

    public static final String DateLastRegex = "(上一个|上个|上一|上|最后一个|最后)(的)?{WeekDayRegex}"
            .replace("{WeekDayRegex}", WeekDayRegex);

    public static final String DateNextRegex = "(下一个|下个|下一|下)(的)?{WeekDayRegex}"
            .replace("{WeekDayRegex}", WeekDayRegex);

    public static final String SpecialDayRegex = "(最近|前天|后天|昨天|明天|今天|今日|明日|昨日|大后天|大前天|後天|大後天)";

    public static final String SpecialDayWithNumRegex = "^[.]";

    public static final String WeekDayOfMonthRegex = "((({MonthRegex}|{MonthNumRegex})的\\s*)(?<cardinal>第一个|第二个|第三个|第四个|第五个|最后一个)\\s*{WeekDayRegex})"
            .replace("{MonthRegex}", MonthRegex)
            .replace("{MonthNumRegex}", MonthNumRegex)
            .replace("{WeekDayRegex}", WeekDayRegex);

    public static final String ThisPrefixRegex = "这个|这一个|这|这一|本|今";

    public static final String LastPrefixRegex = "上个|上一个|上|上一|去";

    public static final String NextPrefixRegex = "下个|下一个|下|下一|明";

    public static final String RelativeRegex = "(?<order>({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex}))"
            .replace("{ThisPrefixRegex}", ThisPrefixRegex)
            .replace("{LastPrefixRegex}", LastPrefixRegex)
            .replace("{NextPrefixRegex}", NextPrefixRegex);

    public static final String SpecialDate = "(?<thisyear>({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})年)?(?<thismonth>({ThisPrefixRegex}|{LastPrefixRegex}|{NextPrefixRegex})月)?{DateDayRegexInChinese}"
            .replace("{ThisPrefixRegex}", ThisPrefixRegex)
            .replace("{LastPrefixRegex}", LastPrefixRegex)
            .replace("{NextPrefixRegex}", NextPrefixRegex)
            .replace("{DateDayRegexInChinese}", DateDayRegexInChinese);

    public static final String DateUnitRegex = "(?<unit>年|个月|周|日|天)";

    public static final String BeforeRegex = "以前|之前|前";

    public static final String AfterRegex = "以后|以後|之后|之後|后|後";

    public static final String DateRegexList1 = "({LunarRegex}(\\s*))?((({SimpleYearRegex}|{DateYearInChineseRegex})年)(\\s*))?{MonthRegex}(\\s*){DateDayRegexInChinese}((\\s*|,|，){WeekDayRegex})?"
            .replace("{LunarRegex}", LunarRegex)
            .replace("{SimpleYearRegex}", SimpleYearRegex)
            .replace("{DateYearInChineseRegex}", DateYearInChineseRegex)
            .replace("{MonthRegex}", MonthRegex)
            .replace("{DateDayRegexInChinese}", DateDayRegexInChinese)
            .replace("{WeekDayRegex}", WeekDayRegex);

    public static final String DateRegexList2 = "((({SimpleYearRegex}|{DateYearInChineseRegex})年)(\\s*))?({LunarRegex}(\\s*))?{MonthRegex}(\\s*){DateDayRegexInChinese}((\\s*|,|，){WeekDayRegex})?"
            .replace("{MonthRegex}", MonthRegex)
            .replace("{DateDayRegexInChinese}", DateDayRegexInChinese)
            .replace("{SimpleYearRegex}", SimpleYearRegex)
            .replace("{LunarRegex}", LunarRegex)
            .replace("{WeekDayRegex}", WeekDayRegex)
            .replace("{DateYearInChineseRegex}", DateYearInChineseRegex);

    public static final String DateRegexList3 = "((({SimpleYearRegex}|{DateYearInChineseRegex})年)(\\s*))?({LunarRegex}(\\s*))?{MonthRegex}(\\s*)({DayRegexNumInChinese}|{DayRegex})((\\s*|,|，){WeekDayRegex})?"
            .replace("{MonthRegex}", MonthRegex)
            .replace("{DayRegexNumInChinese}", DayRegexNumInChinese)
            .replace("{SimpleYearRegex}", SimpleYearRegex)
            .replace("{LunarRegex}", LunarRegex)
            .replace("{WeekDayRegex}", WeekDayRegex)
            .replace("{DateYearInChineseRegex}", DateYearInChineseRegex)
            .replace("{DayRegex}", DayRegex);

    public static final String DateRegexList4 = "{MonthNumRegex}\\s*/\\s*{DayRegex}"
            .replace("{MonthNumRegex}", MonthNumRegex)
            .replace("{DayRegex}", DayRegex);

    public static final String DateRegexList5 = "{DayRegex}\\s*/\\s*{MonthNumRegex}"
            .replace("{DayRegex}", DayRegex)
            .replace("{MonthNumRegex}", MonthNumRegex);

    public static final String DateRegexList6 = "{MonthNumRegex}\\s*[/\\\\\\-]\\s*{DayRegex}\\s*[/\\\\\\-]\\s*{SimpleYearRegex}"
            .replace("{DayRegex}", DayRegex)
            .replace("{MonthNumRegex}", MonthNumRegex)
            .replace("{SimpleYearRegex}", SimpleYearRegex);

    public static final String DateRegexList7 = "{DayRegex}\\s*[/\\\\\\-\\.]\\s*{MonthNumRegex}\\s*[/\\\\\\-\\.]\\s*{SimpleYearRegex}"
            .replace("{DayRegex}", DayRegex)
            .replace("{MonthNumRegex}", MonthNumRegex)
            .replace("{SimpleYearRegex}", SimpleYearRegex);

    public static final String DateRegexList8 = "{SimpleYearRegex}\\s*[/\\\\\\-\\. ]\\s*{MonthNumRegex}\\s*[/\\\\\\-\\. ]\\s*{DayRegex}"
            .replace("{SimpleYearRegex}", SimpleYearRegex)
            .replace("{MonthNumRegex}", MonthNumRegex)
            .replace("{DayRegex}", DayRegex);

    public static final String DatePeriodTillRegex = "(?<till>到|至|--|-|—|——|~|–)";

    public static final String DatePeriodTillSuffixRequiredRegex = "(?<till>与|和)";

    public static final String DatePeriodDayRegexInChinese = "(?<day>初一|三十|一日|十一日|二十一日|三十一日|二日|三日|四日|五日|六日|七日|八日|九日|十二日|十三日|十四日|十五日|十六日|十七日|十八日|十九日|二十二日|二十三日|二十四日|二十五日|二十六日|二十七日|二十八日|二十九日|一日|十一日|十日|二十一日|二十日|三十一日|三十日|二日|三日|四日|五日|六日|七日|八日|九日|十二日|十三日|十四日|十五日|十六日|十七日|十八日|十九日|二十二日|二十三日|二十四日|二十五日|二十六日|二十七日|二十八日|二十九日|十日|二十日|三十日|10日|11日|12日|13日|14日|15日|16日|17日|18日|19日|1日|20日|21日|22日|23日|24日|25日|26日|27日|28日|29日|2日|30日|31日|3日|4日|5日|6日|7日|8日|9日|一号|十一号|二十一号|三十一号|二号|三号|四号|五号|六号|七号|八号|九号|十二号|十三号|十四号|十五号|十六号|十七号|十八号|十九号|二十二号|二十三号|二十四号|二十五号|二十六号|二十七号|二十八号|二十九号|一号|十一号|十号|二十一号|二十号|三十一号|三十号|二号|三号|四号|五号|六号|七号|八号|九号|十二号|十三号|十四号|十五号|十六号|十七号|十八号|十九号|二十二号|二十三号|二十四号|二十五号|二十六号|二十七号|二十八号|二十九号|十号|二十号|三十号|10号|11号|12号|13号|14号|15号|16号|17号|18号|19号|1号|20号|21号|22号|23号|24号|25号|26号|27号|28号|29号|2号|30号|31号|3号|4号|5号|6号|7号|8号|9号|一|十一|二十一|三十一|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|一|十一|十|二十一|二十|三十一|三十|二|三|四|五|六|七|八|九|十二|十三|十四|十五|十六|十七|十八|十九|二十二|二十三|二十四|二十五|二十六|二十七|二十八|二十九|十|二十|三十|廿|卅)";

    public static final String DatePeriodThisRegex = "这个|这一个|这|这一|本";

    public static final String DatePeriodLastRegex = "上个|上一个|上|上一";

    public static final String DatePeriodNextRegex = "下个|下一个|下|下一";

    public static final String RelativeMonthRegex = "(?<relmonth>({DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})\\s*月)"
            .replace("{DatePeriodThisRegex}", DatePeriodThisRegex)
            .replace("{DatePeriodLastRegex}", DatePeriodLastRegex)
            .replace("{DatePeriodNextRegex}", DatePeriodNextRegex);

    public static final String HalfYearRegex = "((?<firstHalf>(上|前)半年)|(?<secondHalf>(下|后)半年))";

    public static final String YearRegex = "(({YearNumRegex})(\\s*年)?|({SimpleYearRegex})\\s*年){HalfYearRegex}?"
            .replace("{YearNumRegex}", YearNumRegex)
            .replace("{SimpleYearRegex}", SimpleYearRegex)
            .replace("{HalfYearRegex}", HalfYearRegex);

    public static final String StrictYearRegex = "({YearRegex}(?=[\\u4E00-\\u9FFF]|\\s|$|\\W))"
            .replace("{YearRegex}", YearRegex);

    public static final String YearRegexInNumber = "(?<year>(\\d{4}))";

    public static final String DatePeriodYearInChineseRegex = "{DateYearInChineseRegex}年{HalfYearRegex}?"
            .replace("{DateYearInChineseRegex}", DateYearInChineseRegex)
            .replace("{HalfYearRegex}", HalfYearRegex);

    public static final String MonthSuffixRegex = "(?<msuf>({RelativeMonthRegex}|{MonthRegex}))"
            .replace("{RelativeMonthRegex}", RelativeMonthRegex)
            .replace("{MonthRegex}", MonthRegex);

    public static final String SimpleCasesRegex = "((从)\\s*)?(({YearRegex}|{DatePeriodYearInChineseRegex})\\s*)?{MonthSuffixRegex}({DatePeriodDayRegexInChinese}|{DayRegex})\\s*{DatePeriodTillRegex}\\s*({DatePeriodDayRegexInChinese}|{DayRegex})((\\s+|\\s*,\\s*){YearRegex})?"
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex)
            .replace("{MonthSuffixRegex}", MonthSuffixRegex)
            .replace("{DatePeriodDayRegexInChinese}", DatePeriodDayRegexInChinese)
            .replace("{DayRegex}", DayRegex)
            .replace("{DatePeriodTillRegex}", DatePeriodTillRegex);

    public static final String YearAndMonth = "({DatePeriodYearInChineseRegex}|{YearRegex})\\s*{MonthRegex}"
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex)
            .replace("{YearRegex}", YearRegex)
            .replace("{MonthRegex}", MonthRegex);

    public static final String PureNumYearAndMonth = "({YearRegexInNumber}\\s*[-\\.\\/]\\s*{MonthNumRegex})|({MonthNumRegex}\\s*\\/\\s*{YearRegexInNumber})"
            .replace("{YearRegexInNumber}", YearRegexInNumber)
            .replace("{MonthNumRegex}", MonthNumRegex);

    public static final String OneWordPeriodRegex = "(((?<yearrel>(明|今|去)年)\\s*)?{MonthRegex}|({DatePeriodThisRegex}|{DatePeriodLastRegex}|{DatePeriodNextRegex})(?<halfTag>半)?\\s*(周末|周|月|年)|周末|(今|明|去|前|后)年(\\s*{HalfYearRegex})?)"
            .replace("{MonthRegex}", MonthRegex)
            .replace("{DatePeriodThisRegex}", DatePeriodThisRegex)
            .replace("{DatePeriodLastRegex}", DatePeriodLastRegex)
            .replace("{DatePeriodNextRegex}", DatePeriodNextRegex)
            .replace("{HalfYearRegex}", HalfYearRegex);

    public static final String WeekOfMonthRegex = "(?<wom>{MonthSuffixRegex}的(?<cardinal>第一|第二|第三|第四|第五|最后一)\\s*周\\s*)"
            .replace("{MonthSuffixRegex}", MonthSuffixRegex);

    public static final String UnitRegex = "(?<unit>年|(个)?月|周|日|天)";

    public static final String FollowedUnit = "^\\s*{UnitRegex}"
            .replace("{UnitRegex}", UnitRegex);

    public static final String NumberCombinedWithUnit = "(?<num>\\d+(\\.\\d*)?){UnitRegex}"
            .replace("{UnitRegex}", UnitRegex);

    public static final String DateRangePrepositions = "((从|在|自)\\s*)?";

    public static final String YearToYear = "({DateRangePrepositions})({DatePeriodYearInChineseRegex}|{YearRegex})\\s*({DatePeriodTillRegex}|后|後|之后|之後)\\s*({DatePeriodYearInChineseRegex}|{YearRegex})(\\s*((之间|之内|期间|中间|间)|前|之前))?"
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex)
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodTillRegex}", DatePeriodTillRegex)
            .replace("{DateRangePrepositions}", DateRangePrepositions);

    public static final String YearToYearSuffixRequired = "({DateRangePrepositions})({DatePeriodYearInChineseRegex}|{YearRegex})\\s*({DatePeriodTillSuffixRequiredRegex})\\s*({DatePeriodYearInChineseRegex}|{YearRegex})\\s*(之间|之内|期间|中间|间)"
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex)
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodTillSuffixRequiredRegex}", DatePeriodTillSuffixRequiredRegex)
            .replace("{DateRangePrepositions}", DateRangePrepositions);

    public static final String MonthToMonth = "({DateRangePrepositions})({MonthRegex}){DatePeriodTillRegex}({MonthRegex})"
            .replace("{MonthRegex}", MonthRegex)
            .replace("{DatePeriodTillRegex}", DatePeriodTillRegex)
            .replace("{DateRangePrepositions}", DateRangePrepositions);

    public static final String MonthToMonthSuffixRequired = "({DateRangePrepositions})({MonthRegex}){DatePeriodTillSuffixRequiredRegex}({MonthRegex})\\s*(之间|之内|期间|中间|间)"
            .replace("{MonthRegex}", MonthRegex)
            .replace("{DatePeriodTillSuffixRequiredRegex}", DatePeriodTillSuffixRequiredRegex)
            .replace("{DateRangePrepositions}", DateRangePrepositions);

    public static final String PastRegex = "(?<past>(之前|前|上|近|过去))";

    public static final String FutureRegex = "(?<future>(之后|之後|后|後|(?<![一两几]\\s*)下|未来(的)?))";

    public static final String SeasonRegex = "(?<season>春|夏|秋|冬)(天|季)?";

    public static final String SeasonWithYear = "(({YearRegex}|{DatePeriodYearInChineseRegex}|(?<yearrel>明年|今年|去年))(的)?)?{SeasonRegex}"
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex)
            .replace("{SeasonRegex}", SeasonRegex);

    public static final String QuarterRegex = "(({YearRegex}|{DatePeriodYearInChineseRegex}|(?<yearrel>明年|今年|去年))(的)?)?(第(?<cardinal>1|2|3|4|一|二|三|四)季度)"
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex);

    public static final String CenturyRegex = "(?<century>\\d|1\\d|2\\d)世纪";

    public static final String CenturyRegexInChinese = "(?<century>一|二|三|四|五|六|七|八|九|十|十一|十二|十三|十四|十五|十六|十七|十八|十九|二十|二十一|二十二)世纪";

    public static final String RelativeCenturyRegex = "(?<relcentury>({DatePeriodLastRegex}|{DatePeriodThisRegex}|{DatePeriodNextRegex}))世纪"
            .replace("{DatePeriodLastRegex}", DatePeriodLastRegex)
            .replace("{DatePeriodThisRegex}", DatePeriodThisRegex)
            .replace("{DatePeriodNextRegex}", DatePeriodNextRegex);

    public static final String DecadeRegexInChinese = "(?<decade>十|一十|二十|三十|四十|五十|六十|七十|八十|九十)";

    public static final String DecadeRegex = "(?<centurysuf>({CenturyRegex}|{CenturyRegexInChinese}|{RelativeCenturyRegex}))?(?<decade>(\\d0|{DecadeRegexInChinese}))年代"
            .replace("{CenturyRegex}", CenturyRegex)
            .replace("{CenturyRegexInChinese}", CenturyRegexInChinese)
            .replace("{RelativeCenturyRegex}", RelativeCenturyRegex)
            .replace("{DecadeRegexInChinese}", DecadeRegexInChinese);

    public static final String PrepositionRegex = "(?<prep>^的|在$)";

    public static final String NowRegex = "(?<now>现在|马上|立刻|刚刚才|刚刚|刚才|这会儿|当下|此刻)";

    public static final String NightRegex = "(?<night>早|晚)";

    public static final String TimeOfTodayRegex = "(今晚|今早|今晨|明晚|明早|明晨|昨晚)(的|在)?";

    public static final String DateTimePeriodTillRegex = "(?<till>到|直到|--|-|—|——)";

    public static final String DateTimePeriodPrepositionRegex = "(?<prep>^\\s*的|在\\s*$)";

    public static final String HourRegex = "\\b{BaseDateTime.HourRegex}"
            .replace("{BaseDateTime.HourRegex}", BaseDateTime.HourRegex);

    public static final String HourNumRegex = "(?<hour>[零〇一二两三四五六七八九]|二十[一二三四]?|十[一二三四五六七八九]?)";

    public static final String ZhijianRegex = "^\\s*(之间|之内|期间|中间|间)";

    public static final String DateTimePeriodThisRegex = "这个|这一个|这|这一";

    public static final String DateTimePeriodLastRegex = "上个|上一个|上|上一";

    public static final String DateTimePeriodNextRegex = "下个|下一个|下|下一";

    public static final String AmPmDescRegex = "(?<daydesc>(am|a\\.m\\.|a m|a\\. m\\.|a\\.m|a\\. m|a m|pm|p\\.m\\.|p m|p\\. m\\.|p\\.m|p\\. m|p m))";

    public static final String TimeOfDayRegex = "(?<timeOfDay>凌晨|清晨|早上|早间|早|上午|中午|下午|午后|晚上|夜里|夜晚|半夜|夜间|深夜|傍晚|晚)";

    public static final String SpecificTimeOfDayRegex = "((({DateTimePeriodThisRegex}|{DateTimePeriodNextRegex}|{DateTimePeriodLastRegex})\\s+{TimeOfDayRegex})|(今晚|今早|今晨|明晚|明早|明晨|昨晚))"
            .replace("{DateTimePeriodThisRegex}", DateTimePeriodThisRegex)
            .replace("{DateTimePeriodNextRegex}", DateTimePeriodNextRegex)
            .replace("{DateTimePeriodLastRegex}", DateTimePeriodLastRegex)
            .replace("{TimeOfDayRegex}", TimeOfDayRegex);

    public static final String DateTimePeriodUnitRegex = "(个)?(?<unit>(小时|钟头|分钟|秒钟|时|分|秒))";

    public static final String DateTimePeriodFollowedUnit = "^\\s*{DateTimePeriodUnitRegex}"
            .replace("{DateTimePeriodUnitRegex}", DateTimePeriodUnitRegex);

    public static final String DateTimePeriodNumberCombinedWithUnit = "\\b(?<num>\\d+(\\.\\d*)?){DateTimePeriodUnitRegex}"
            .replace("{DateTimePeriodUnitRegex}", DateTimePeriodUnitRegex);

    public static final String DurationYearRegex = "((\\d{3,4})|0\\d|两千)\\s*年";

    public static final String DurationHalfSuffixRegex = "半";

    public static final ImmutableMap<String, String> DurationSuffixList = ImmutableMap.<String, String>builder()
        .put("M", "分钟")
        .put("S", "秒钟|秒")
        .put("H", "个小时|小时|个钟头|钟头|时")
        .put("D", "天")
        .put("W", "星期|个星期|周")
        .put("Mon", "个月")
        .put("Y", "年")
        .build();

    public static final List<String> DurationAmbiguousUnits = Arrays.asList("分钟", "秒钟", "秒", "个小时", "小时", "天", "星期", "个星期", "周", "个月", "年", "时");

    public static final String DurationUnitRegex = "(?<unit>{DateUnitRegex}|分钟?|秒钟?|个?小时|时|个?钟头|天|个?星期|周|个?月|年)"
            .replace("{DateUnitRegex}", DateUnitRegex);

    public static final String DurationConnectorRegex = "^\\s*(?<connector>[多又余零]?)\\s*$";

    public static final String LunarHolidayRegex = "(({YearRegex}|{DatePeriodYearInChineseRegex}|(?<yearrel>明年|今年|去年))(的)?)?(?<holiday>除夕|春节|中秋节|中秋|元宵节|端午节|端午|重阳节)"
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex);

    public static final String HolidayRegexList1 = "(({YearRegex}|{DatePeriodYearInChineseRegex}|(?<yearrel>明年|今年|去年))(的)?)?(?<holiday>新年|五一|劳动节|元旦节|元旦|愚人节|平安夜|圣诞节|植树节|国庆节|情人节|教师节|儿童节|妇女节|青年节|建军节|女生节|光棍节|双十一|清明节|清明)"
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex);

    public static final String HolidayRegexList2 = "(({YearRegex}|{DatePeriodYearInChineseRegex}|(?<yearrel>明年|今年|去年))(的)?)?(?<holiday>母亲节|父亲节|感恩节|万圣节)"
            .replace("{YearRegex}", YearRegex)
            .replace("{DatePeriodYearInChineseRegex}", DatePeriodYearInChineseRegex);

    public static final String SetUnitRegex = "(?<unit>年|月|周|星期|日|天|小时|时|分钟|分|秒钟|秒)";

    public static final String SetEachUnitRegex = "(?<each>(每个|每一|每)\\s*{SetUnitRegex})"
            .replace("{SetUnitRegex}", SetUnitRegex);

    public static final String SetEachPrefixRegex = "(?<each>(每)\\s*$)";

    public static final String SetLastRegex = "(?<last>last|this|next)";

    public static final String SetEachDayRegex = "(每|每一)(天|日)\\s*$";

    public static final String TimeHourNumRegex = "(00|01|02|03|04|05|06|07|08|09|0|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|1|2|3|4|5|6|7|8|9)";

    public static final String TimeMinuteNumRegex = "(00|01|02|03|04|05|06|07|08|09|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|0|1|2|3|4|5|6|7|8|9)";

    public static final String TimeSecondNumRegex = "(00|01|02|03|04|05|06|07|08|09|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|0|1|2|3|4|5|6|7|8|9)";

    public static final String TimeHourChsRegex = "([零〇一二两三四五六七八九]|二十[一二三四]?|十[一二三四五六七八九]?)";

    public static final String TimeMinuteChsRegex = "([二三四五]?十[一二三四五六七八九]?|六十|[零〇一二三四五六七八九])";

    public static final String TimeSecondChsRegex = "{TimeMinuteChsRegex}"
            .replace("{TimeMinuteChsRegex}", TimeMinuteChsRegex);

    public static final String TimeClockDescRegex = "(点\\s*整|点\\s*钟|点|时)";

    public static final String TimeMinuteDescRegex = "(分钟|分|)";

    public static final String TimeSecondDescRegex = "(秒钟|秒)";

    public static final String TimeBanHourPrefixRegex = "(第)";

    public static final String TimeHourRegex = "(?<!{TimeBanHourPrefixRegex})(?<hour>{TimeHourChsRegex}|{TimeHourNumRegex}){TimeClockDescRegex}"
            .replace("{TimeBanHourPrefixRegex}", TimeBanHourPrefixRegex)
            .replace("{TimeHourChsRegex}", TimeHourChsRegex)
            .replace("{TimeHourNumRegex}", TimeHourNumRegex)
            .replace("{TimeClockDescRegex}", TimeClockDescRegex);

    public static final String TimeMinuteRegex = "(?<min>{TimeMinuteChsRegex}|{TimeMinuteNumRegex}){TimeMinuteDescRegex}"
            .replace("{TimeMinuteChsRegex}", TimeMinuteChsRegex)
            .replace("{TimeMinuteNumRegex}", TimeMinuteNumRegex)
            .replace("{TimeMinuteDescRegex}", TimeMinuteDescRegex);

    public static final String TimeSecondRegex = "(?<sec>{TimeSecondChsRegex}|{TimeSecondNumRegex}){TimeSecondDescRegex}"
            .replace("{TimeSecondChsRegex}", TimeSecondChsRegex)
            .replace("{TimeSecondNumRegex}", TimeSecondNumRegex)
            .replace("{TimeSecondDescRegex}", TimeSecondDescRegex);

    public static final String TimeHalfRegex = "(?<half>过半|半)";

    public static final String TimeQuarterRegex = "(?<quarter>[一两二三四1-4])\\s*(刻钟|刻)";

    public static final String TimeChineseTimeRegex = "{TimeHourRegex}({TimeQuarterRegex}|{TimeHalfRegex}|((过|又)?{TimeMinuteRegex})({TimeSecondRegex})?)?"
            .replace("{TimeHourRegex}", TimeHourRegex)
            .replace("{TimeQuarterRegex}", TimeQuarterRegex)
            .replace("{TimeHalfRegex}", TimeHalfRegex)
            .replace("{TimeMinuteRegex}", TimeMinuteRegex)
            .replace("{TimeSecondRegex}", TimeSecondRegex);

    public static final String TimeDigitTimeRegex = "(?<hour>{TimeHourNumRegex}):(?<min>{TimeMinuteNumRegex})(:(?<sec>{TimeSecondNumRegex}))?"
            .replace("{TimeHourNumRegex}", TimeHourNumRegex)
            .replace("{TimeMinuteNumRegex}", TimeMinuteNumRegex)
            .replace("{TimeSecondNumRegex}", TimeSecondNumRegex);

    public static final String TimeDayDescRegex = "(?<daydesc>凌晨|清晨|早上|早间|早|上午|中午|下午|午后|晚上|夜里|夜晚|半夜|午夜|夜间|深夜|傍晚|晚)";

    public static final String TimeApproximateDescPreffixRegex = "(大[约概]|差不多|可能|也许|约|不超过|不多[于过]|最[多长少]|少于|[超短长多]过|几乎要|将近|差点|快要|接近|至少|起码|超出|不到)";

    public static final String TimeApproximateDescSuffixRegex = "(左右)";

    public static final String TimeRegexes1 = "{TimeApproximateDescPreffixRegex}?{TimeDayDescRegex}?{TimeChineseTimeRegex}{TimeApproximateDescSuffixRegex}?"
            .replace("{TimeApproximateDescPreffixRegex}", TimeApproximateDescPreffixRegex)
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeChineseTimeRegex}", TimeChineseTimeRegex)
            .replace("{TimeApproximateDescSuffixRegex}", TimeApproximateDescSuffixRegex);

    public static final String TimeRegexes2 = "{TimeApproximateDescPreffixRegex}?{TimeDayDescRegex}?{TimeDigitTimeRegex}{TimeApproximateDescSuffixRegex}?(\\s*{AmPmDescRegex}?)"
            .replace("{TimeApproximateDescPreffixRegex}", TimeApproximateDescPreffixRegex)
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeDigitTimeRegex}", TimeDigitTimeRegex)
            .replace("{TimeApproximateDescSuffixRegex}", TimeApproximateDescSuffixRegex)
            .replace("{AmPmDescRegex}", AmPmDescRegex);

    public static final String TimeRegexes3 = "差{TimeMinuteRegex}{TimeChineseTimeRegex}"
            .replace("{TimeMinuteRegex}", TimeMinuteRegex)
            .replace("{TimeChineseTimeRegex}", TimeChineseTimeRegex);

    public static final String TimePeriodTimePeriodConnectWords = "(起|至|到|–|-|—|~|～)";

    public static final String TimePeriodLeftChsTimeRegex = "(从)?(?<left>{TimeDayDescRegex}?({TimeChineseTimeRegex}))"
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeChineseTimeRegex}", TimeChineseTimeRegex);

    public static final String TimePeriodRightChsTimeRegex = "{TimePeriodTimePeriodConnectWords}(?<right>{TimeDayDescRegex}?{TimeChineseTimeRegex})(之间)?"
            .replace("{TimePeriodTimePeriodConnectWords}", TimePeriodTimePeriodConnectWords)
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeChineseTimeRegex}", TimeChineseTimeRegex);

    public static final String TimePeriodLeftDigitTimeRegex = "(从)?(?<left>{TimeDayDescRegex}?({TimeDigitTimeRegex}))"
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeDigitTimeRegex}", TimeDigitTimeRegex);

    public static final String TimePeriodRightDigitTimeRegex = "{TimePeriodTimePeriodConnectWords}(?<right>{TimeDayDescRegex}?{TimeDigitTimeRegex})(之间)?"
            .replace("{TimePeriodTimePeriodConnectWords}", TimePeriodTimePeriodConnectWords)
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeDigitTimeRegex}", TimeDigitTimeRegex);

    public static final String TimePeriodShortLeftChsTimeRegex = "(从)?(?<left>{TimeDayDescRegex}?({TimeHourChsRegex}))"
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeHourChsRegex}", TimeHourChsRegex);

    public static final String TimePeriodShortLeftDigitTimeRegex = "(从)?(?<left>{TimeDayDescRegex}?({TimeHourNumRegex}))"
            .replace("{TimeDayDescRegex}", TimeDayDescRegex)
            .replace("{TimeHourNumRegex}", TimeHourNumRegex);

    public static final String TimePeriodRegexes1 = "({TimePeriodLeftDigitTimeRegex}{TimePeriodRightDigitTimeRegex}|{TimePeriodLeftChsTimeRegex}{TimePeriodRightChsTimeRegex})"
            .replace("{TimePeriodLeftDigitTimeRegex}", TimePeriodLeftDigitTimeRegex)
            .replace("{TimePeriodRightDigitTimeRegex}", TimePeriodRightDigitTimeRegex)
            .replace("{TimePeriodLeftChsTimeRegex}", TimePeriodLeftChsTimeRegex)
            .replace("{TimePeriodRightChsTimeRegex}", TimePeriodRightChsTimeRegex);

    public static final String TimePeriodRegexes2 = "({TimePeriodShortLeftDigitTimeRegex}{TimePeriodRightDigitTimeRegex}|{TimePeriodShortLeftChsTimeRegex}{TimePeriodRightChsTimeRegex})"
            .replace("{TimePeriodShortLeftDigitTimeRegex}", TimePeriodShortLeftDigitTimeRegex)
            .replace("{TimePeriodRightDigitTimeRegex}", TimePeriodRightDigitTimeRegex)
