public JapaneseSetExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { DurationExtractor = new BaseCJKDurationExtractor(new JapaneseDurationExtractorConfiguration(this)); TimeExtractor = new BaseCJKTimeExtractor(new JapaneseTimeExtractorConfiguration(this)); DateExtractor = new BaseCJKDateExtractor(new JapaneseDateExtractorConfiguration(this)); DateTimeExtractor = new BaseCJKDateTimeExtractor(new JapaneseDateTimeExtractorConfiguration(this)); DatePeriodExtractor = new BaseCJKDatePeriodExtractor(new JapaneseDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseCJKTimePeriodExtractor(new JapaneseTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseCJKDateTimePeriodExtractor(new JapaneseDateTimePeriodExtractorConfiguration(this)); }
public KoreanSetExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { DurationExtractor = new BaseCJKDurationExtractor(new KoreanDurationExtractorConfiguration(this)); TimeExtractor = new BaseCJKTimeExtractor(new KoreanTimeExtractorConfiguration(this)); DateExtractor = new BaseCJKDateExtractor(new KoreanDateExtractorConfiguration(this)); DateTimeExtractor = new BaseCJKDateTimeExtractor(new KoreanDateTimeExtractorConfiguration(this)); DatePeriodExtractor = new BaseCJKDatePeriodExtractor(new KoreanDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseCJKTimePeriodExtractor(new KoreanTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseCJKDateTimePeriodExtractor(new KoreanDateTimePeriodExtractorConfiguration(this)); }
public ChineseMergedExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict); DateExtractor = new BaseCJKDateExtractor(new ChineseDateExtractorConfiguration(this)); TimeExtractor = new BaseCJKTimeExtractor(new ChineseTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseCJKDateTimeExtractor(new ChineseDateTimeExtractorConfiguration(this)); DatePeriodExtractor = new BaseCJKDatePeriodExtractor(new ChineseDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseCJKTimePeriodExtractor(new ChineseTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseCJKDateTimePeriodExtractor(new ChineseDateTimePeriodExtractorConfiguration(this)); DurationExtractor = new BaseCJKDurationExtractor(new ChineseDurationExtractorConfiguration(this)); SetExtractor = new BaseCJKSetExtractor(new ChineseSetExtractorConfiguration(this)); HolidayExtractor = new BaseCJKHolidayExtractor(new ChineseHolidayExtractorConfiguration(this)); }
public ChineseCommonDateTimeParserConfiguration(IDateTimeOptionsConfiguration config) : base(config) { UnitMap = DateTimeDefinitions.ParserConfigurationUnitMap.ToImmutableDictionary(k => k.Key, k => k.Value.Substring(0, 1) + k.Value.Substring(1).ToLower()); UnitValueMap = DateTimeDefinitions.DurationUnitValueMap.ToImmutableDictionary(); CardinalMap = DateTimeDefinitions.ParserConfigurationCardinalMap.ToImmutableDictionary(); DayOfMonth = DateTimeDefinitions.ParserConfigurationDayOfMonth.ToImmutableDictionary(); DayOfWeek = DateTimeDefinitions.ParserConfigurationDayOfWeek.ToImmutableDictionary(); MonthOfYear = DateTimeDefinitions.ParserConfigurationMonthOfYear.ToImmutableDictionary(); var numOptions = NumberOptions.None; if ((config.Options & DateTimeOptions.NoProtoCache) != 0) { numOptions = NumberOptions.NoProtoCache; } var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions); IntegerExtractor = new IntegerExtractor(numConfig); CardinalExtractor = new CardinalExtractor(numConfig); OrdinalExtractor = new OrdinalExtractor(numConfig); NumberParser = new BaseCJKNumberParser(new ChineseNumberParserConfiguration(numConfig)); // Do not change order. The order of initialization can lead to side-effects DateExtractor = new BaseCJKDateExtractor(new ChineseDateExtractorConfiguration(this)); TimeExtractor = new BaseCJKTimeExtractor(new ChineseTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseCJKDateTimeExtractor(new ChineseDateTimeExtractorConfiguration(this)); DurationExtractor = new BaseCJKDurationExtractor(new ChineseDurationExtractorConfiguration(this)); DatePeriodExtractor = new BaseCJKDatePeriodExtractor(new ChineseDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseCJKTimePeriodExtractor(new ChineseTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseCJKDateTimePeriodExtractor(new ChineseDateTimePeriodExtractorConfiguration(this)); HolidayExtractor = new BaseCJKDurationExtractor(new ChineseDurationExtractorConfiguration(this)); SetExtractor = new BaseCJKDurationExtractor(new ChineseDurationExtractorConfiguration(this)); DurationParser = new BaseCJKDurationParser(new ChineseDurationParserConfiguration(this)); DateParser = new BaseCJKDateParser(new ChineseDateParserConfiguration(this)); TimeParser = new BaseCJKTimeParser(new ChineseTimeParserConfiguration(this)); DateTimeParser = new BaseCJKDateTimeParser(new ChineseDateTimeParserConfiguration(this)); DatePeriodParser = new BaseCJKDatePeriodParser(new ChineseDatePeriodParserConfiguration(this)); TimePeriodParser = new BaseCJKTimePeriodParser(new ChineseTimePeriodParserConfiguration(this)); DateTimePeriodParser = new BaseCJKDateTimePeriodParser(new ChineseDateTimePeriodParserConfiguration(this)); HolidayParser = new BaseCJKHolidayParser(new ChineseHolidayParserConfiguration(this)); SetParser = new BaseCJKSetParser(new ChineseSetParserConfiguration(this)); }