public DutchTimePeriodExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { TokenBeforeDate = DateTimeDefinitions.TokenBeforeDate; SingleTimeExtractor = new BaseTimeExtractor(new DutchTimeExtractorConfiguration(this)); UtilityConfiguration = new DutchDatetimeUtilityConfiguration(); var numOptions = NumberOptions.None; if ((config.Options & DateTimeOptions.NoProtoCache) != 0) { numOptions = NumberOptions.NoProtoCache; } var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions); IntegerExtractor = Number.Dutch.IntegerExtractor.GetInstance(numConfig); TimeZoneExtractor = new BaseTimeZoneExtractor(new DutchTimeZoneExtractorConfiguration(this)); }
public ThaiMergedExtractorConfiguration(DateTimeOptions options) { Options = options | DateTimeOptions.Format24; DateExtractor = new BaseDateExtractor(new ThaiDateExtractorConfiguration()); TimeExtractor = new BaseTimeExtractor(new ThaiTimeExtractorConfiguration(options)); DateTimeExtractor = new BaseDateTimeExtractor(new ThaiDateTimeExtractorConfiguration(options)); DatePeriodExtractor = new BaseDatePeriodExtractor(new ThaiDatePeriodExtractorConfiguration()); TimePeriodExtractor = new BaseTimePeriodExtractor(new ThaiTimePeriodExtractorConfiguration(options)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new ThaiDateTimePeriodExtractorConfiguration(options)); DurationExtractor = new BaseDurationExtractor(new ThaiDurationExtractorConfiguration(options)); SetExtractor = null; HolidayExtractor = null; TimeZoneExtractor = null; DateTimeAltExtractor = null; IntegerExtractor = Number.Thai.IntegerExtractor.GetInstance(); // if ((options & DateTimeOptions.EnablePreview) != 0) // { // SuperfluousWordMatcher.Init(DateTimeDefinitions.SuperfluousWordList); // } }
public EnglishMergedExtractorConfiguration(DateTimeOptions options) { Options = options; DateExtractor = new BaseDateExtractor(new EnglishDateExtractorConfiguration()); TimeExtractor = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration(options)); DateTimeExtractor = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration(options)); DatePeriodExtractor = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration()); TimePeriodExtractor = new BaseTimePeriodExtractor(new EnglishTimePeriodExtractorConfiguration(options)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new EnglishDateTimePeriodExtractorConfiguration(options)); DurationExtractor = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration(options)); SetExtractor = new BaseSetExtractor(new EnglishSetExtractorConfiguration()); HolidayExtractor = new BaseHolidayExtractor(new EnglishHolidayExtractorConfiguration()); TimeZoneExtractor = new BaseTimeZoneExtractor(new EnglishTimeZoneExtractorConfiguration(options)); DateTimeAltExtractor = new BaseDateTimeAltExtractor(new EnglishDateTimeAltExtractorConfiguration()); IntegerExtractor = Number.English.IntegerExtractor.GetInstance(); if ((options & DateTimeOptions.EnablePreview) != 0) { SuperfluousWordMatcher.Init(DateTimeDefinitions.SuperfluousWordList); } }
public FrenchCommonDateTimeParserConfiguration(IDateTimeOptionsConfiguration config) : base(config) { UtilityConfiguration = new FrenchDatetimeUtilityConfiguration(); UnitMap = DateTimeDefinitions.UnitMap.ToImmutableDictionary(); UnitValueMap = DateTimeDefinitions.UnitValueMap.ToImmutableDictionary(); SeasonMap = DateTimeDefinitions.SeasonMap.ToImmutableDictionary(); SpecialYearPrefixesMap = DateTimeDefinitions.SpecialYearPrefixesMap.ToImmutableDictionary(); CardinalMap = DateTimeDefinitions.CardinalMap.ToImmutableDictionary(); DayOfWeek = DateTimeDefinitions.DayOfWeek.ToImmutableDictionary(); MonthOfYear = DateTimeDefinitions.MonthOfYear.ToImmutableDictionary(); Numbers = DateTimeDefinitions.Numbers.ToImmutableDictionary(); DoubleNumbers = DateTimeDefinitions.DoubleNumbers.ToImmutableDictionary(); WrittenDecades = DateTimeDefinitions.WrittenDecades.ToImmutableDictionary(); SpecialDecadeCases = DateTimeDefinitions.SpecialDecadeCases.ToImmutableDictionary(); CardinalExtractor = Number.French.CardinalExtractor.GetInstance(); IntegerExtractor = Number.French.IntegerExtractor.GetInstance(); OrdinalExtractor = Number.French.OrdinalExtractor.GetInstance(); NumberParser = new BaseNumberParser(new FrenchNumberParserConfiguration(new BaseNumberOptionsConfiguration(config.Culture))); DateExtractor = new BaseDateExtractor(new FrenchDateExtractorConfiguration(this)); TimeExtractor = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration(this)); DurationExtractor = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new FrenchDateTimePeriodExtractorConfiguration(this)); // DurationParser should be assigned first, as DateParser would reference the DurationParser DurationParser = new BaseDurationParser(new FrenchDurationParserConfiguration(this)); DateParser = new BaseDateParser(new FrenchDateParserConfiguration(this)); TimeParser = new BaseTimeParser(new FrenchTimeParserConfiguration(this)); DateTimeParser = new BaseDateTimeParser(new FrenchDateTimeParserConfiguration(this)); DatePeriodParser = new BaseDatePeriodParser(new FrenchDatePeriodParserConfiguration(this)); TimePeriodParser = new BaseTimePeriodParser(new FrenchTimePeriodParserConfiguration(this)); DateTimePeriodParser = new BaseDateTimePeriodParser(new FrenchDateTimePeriodParserConfiguration(this)); DateTimeAltParser = new BaseDateTimeAltParser(new FrenchDateTimeAltParserConfiguration(this)); }
public DutchCommonDateTimeParserConfiguration(IOptionsConfiguration config) : base(config) { UtilityConfiguration = new DutchDatetimeUtilityConfiguration(); UnitMap = DateTimeDefinitions.UnitMap.ToImmutableDictionary(); UnitValueMap = DateTimeDefinitions.UnitValueMap.ToImmutableDictionary(); SeasonMap = DateTimeDefinitions.SeasonMap.ToImmutableDictionary(); SpecialYearPrefixesMap = DateTimeDefinitions.SpecialYearPrefixesMap.ToImmutableDictionary(); CardinalMap = DateTimeDefinitions.CardinalMap.ToImmutableDictionary(); DayOfWeek = DateTimeDefinitions.DayOfWeek.ToImmutableDictionary(); MonthOfYear = DateTimeDefinitions.MonthOfYear.ToImmutableDictionary(); Numbers = DateTimeDefinitions.Numbers.ToImmutableDictionary(); DoubleNumbers = DateTimeDefinitions.DoubleNumbers.ToImmutableDictionary(); WrittenDecades = DateTimeDefinitions.WrittenDecades.ToImmutableDictionary(); SpecialDecadeCases = DateTimeDefinitions.SpecialDecadeCases.ToImmutableDictionary(); CardinalExtractor = Number.Dutch.CardinalExtractor.GetInstance(); IntegerExtractor = Number.Dutch.IntegerExtractor.GetInstance(); OrdinalExtractor = Number.Dutch.OrdinalExtractor.GetInstance(); TimeZoneParser = new BaseTimeZoneParser(); NumberParser = new BaseNumberParser(new DutchNumberParserConfiguration()); DateExtractor = new BaseDateExtractor(new DutchDateExtractorConfiguration(this)); TimeExtractor = new BaseTimeExtractor(new DutchTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseDateTimeExtractor(new DutchDateTimeExtractorConfiguration(this)); DurationExtractor = new BaseDurationExtractor(new DutchDurationExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new DutchDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseTimePeriodExtractor(new DutchTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new DutchDateTimePeriodExtractorConfiguration(this)); DurationParser = new BaseDurationParser(new DutchDurationParserConfiguration(this)); DateParser = new BaseDateParser(new DutchDateParserConfiguration(this)); TimeParser = new TimeParser(new DutchTimeParserConfiguration(this)); DateTimeParser = new BaseDateTimeParser(new DutchDateTimeParserConfiguration(this)); DatePeriodParser = new BaseDatePeriodParser(new DutchDatePeriodParserConfiguration(this)); TimePeriodParser = new BaseTimePeriodParser(new DutchTimePeriodParserConfiguration(this)); DateTimePeriodParser = new BaseDateTimePeriodParser(new DutchDateTimePeriodParserConfiguration(this)); DateTimeAltParser = new BaseDateTimeAltParser(new DutchDateTimeAltParserConfiguration(this)); }
public HindiMergedExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { DateExtractor = new BaseDateExtractor(new HindiDateExtractorConfiguration(this)); TimeExtractor = new BaseTimeExtractor(new HindiTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseDateTimeExtractor(new HindiDateTimeExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new HindiDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseTimePeriodExtractor(new HindiTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new HindiDateTimePeriodExtractorConfiguration(this)); DurationExtractor = new BaseDurationExtractor(new HindiDurationExtractorConfiguration(this)); SetExtractor = new BaseSetExtractor(new HindiSetExtractorConfiguration(this)); HolidayExtractor = new BaseHolidayExtractor(new HindiHolidayExtractorConfiguration(this)); DateTimeAltExtractor = new BaseDateTimeAltExtractor(new HindiDateTimeAltExtractorConfiguration(this)); IntegerExtractor = Number.Hindi.IntegerExtractor.GetInstance(); AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict); if ((Options & DateTimeOptions.EnablePreview) != 0) { SuperfluousWordMatcher.Init(DateTimeDefinitions.SuperfluousWordList); } }
public ArabicDateTimePeriodExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { TokenBeforeDate = DateTimeDefinitions.TokenBeforeDate; var numOptions = NumberOptions.None; if ((config.Options & DateTimeOptions.NoProtoCache) != 0) { numOptions = NumberOptions.NoProtoCache; } var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions); CardinalExtractor = Number.Arabic.CardinalExtractor.GetInstance(numConfig); SingleDateExtractor = new BaseDateExtractor(new ArabicDateExtractorConfiguration(this)); SingleTimeExtractor = new BaseTimeExtractor(new ArabicTimeExtractorConfiguration(this)); SingleDateTimeExtractor = new BaseDateTimeExtractor(new ArabicDateTimeExtractorConfiguration(this)); DurationExtractor = new BaseDurationExtractor(new ArabicDurationExtractorConfiguration(this)); TimePeriodExtractor = new BaseTimePeriodExtractor(new ArabicTimePeriodExtractorConfiguration(this)); }
public SpanishCommonDateTimeParserConfiguration() { UnitMap = InitUnitMap(); UnitValueMap = InitUnitValueMap(); SeasonMap = InitSeasonMap(); CardinalMap = InitCardinalMap(); DayOfWeek = InitDayOfWeek(); MonthOfYear = InitMonthOfYear(); Numbers = InitNumbers(); CardinalExtractor = new CardinalExtractor(); IntegerExtractor = new IntegerExtractor(); OrdinalExtractor = new OrdinalExtractor(); NumberParser = new BaseNumberParser(new SpanishNumberParserConfiguration()); DateExtractor = new BaseDateExtractor(new SpanishDateExtractorConfiguration()); TimeExtractor = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration()); DateTimeExtractor = new BaseDateTimeExtractor(new SpanishDateTimeExtractorConfiguration()); DurationExtractor = new BaseDurationExtractor(new SpanishDurationExtractorConfiguration()); DateParser = new BaseDateParser(new SpanishDateParserConfiguration(this)); TimeParser = new BaseTimeParser(new SpanishTimeParserConfiguration(this)); DateTimeParser = new BaseDateTimeParser(new SpanishDateTimeParserConfiguration(this)); DurationParser = new BaseDurationParser(new SpanishDurationParserConfiguration(this)); }
public SwedishMergedExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { DateExtractor = new BaseDateExtractor(new SwedishDateExtractorConfiguration(this)); TimeExtractor = new BaseTimeExtractor(new SwedishTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseDateTimeExtractor(new SwedishDateTimeExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new SwedishDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseTimePeriodExtractor(new SwedishTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new SwedishDateTimePeriodExtractorConfiguration(this)); DurationExtractor = new BaseDurationExtractor(new SwedishDurationExtractorConfiguration(this)); SetExtractor = new BaseSetExtractor(new SwedishSetExtractorConfiguration(this)); HolidayExtractor = new BaseHolidayExtractor(new SwedishHolidayExtractorConfiguration(this)); TimeZoneExtractor = new BaseTimeZoneExtractor(new SwedishTimeZoneExtractorConfiguration(this)); DateTimeAltExtractor = new BaseDateTimeAltExtractor(new SwedishDateTimeAltExtractorConfiguration(this)); var numOptions = NumberOptions.None; if ((config.Options & DateTimeOptions.NoProtoCache) != 0) { numOptions = NumberOptions.NoProtoCache; } if ((config.Options & DateTimeOptions.ExperimentalMode) != 0) { SinceRegex = SinceRegexExp; } var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions); IntegerExtractor = Number.Swedish.IntegerExtractor.GetInstance(numConfig); AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict); if ((Options & DateTimeOptions.EnablePreview) != 0) { SuperfluousWordMatcher.Init(DateTimeDefinitions.SuperfluousWordList); } }
public ItalianCommonDateTimeParserConfiguration(IDateTimeOptionsConfiguration config) : base(config) { UtilityConfiguration = new ItalianDatetimeUtilityConfiguration(); UnitMap = DateTimeDefinitions.UnitMap.ToImmutableDictionary(); UnitValueMap = DateTimeDefinitions.UnitValueMap.ToImmutableDictionary(); SeasonMap = DateTimeDefinitions.SeasonMap.ToImmutableDictionary(); CardinalMap = DateTimeDefinitions.CardinalMap.ToImmutableDictionary(); DayOfWeek = DateTimeDefinitions.DayOfWeek.ToImmutableDictionary(); MonthOfYear = DateTimeDefinitions.MonthOfYear.ToImmutableDictionary(); Numbers = DateTimeDefinitions.Numbers.ToImmutableDictionary(); DoubleNumbers = DateTimeDefinitions.DoubleNumbers.ToImmutableDictionary(); WrittenDecades = DateTimeDefinitions.WrittenDecades.ToImmutableDictionary(); SpecialDecadeCases = DateTimeDefinitions.SpecialDecadeCases.ToImmutableDictionary(); CardinalExtractor = Number.Italian.CardinalExtractor.GetInstance(); IntegerExtractor = Number.Italian.IntegerExtractor.GetInstance(); OrdinalExtractor = Number.Italian.OrdinalExtractor.GetInstance(); NumberParser = new BaseNumberParser(new ItalianNumberParserConfiguration(new BaseNumberOptionsConfiguration(config.Culture))); DateExtractor = new BaseDateExtractor(new ItalianDateExtractorConfiguration(this)); TimeExtractor = new BaseTimeExtractor(new ItalianTimeExtractorConfiguration(this)); DateTimeExtractor = new BaseDateTimeExtractor(new ItalianDateTimeExtractorConfiguration(this)); DurationExtractor = new BaseDurationExtractor(new ItalianDurationExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new ItalianDatePeriodExtractorConfiguration(this)); TimePeriodExtractor = new BaseTimePeriodExtractor(new ItalianTimePeriodExtractorConfiguration(this)); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new ItalianDateTimePeriodExtractorConfiguration(this)); DateParser = new BaseDateParser(new ItalianDateParserConfiguration(this)); TimeParser = new TimeParser(new ItalianTimeParserConfiguration(this)); DateTimeParser = new BaseDateTimeParser(new ItalianDateTimeParserConfiguration(this)); DurationParser = new BaseDurationParser(new ItalianDurationParserConfiguration(this)); DatePeriodParser = new BaseDatePeriodParser(new ItalianDatePeriodParserConfiguration(this)); TimePeriodParser = new BaseTimePeriodParser(new ItalianTimePeriodParserConfiguration(this)); DateTimePeriodParser = new BaseDateTimePeriodParser(new ItalianDateTimePeriodParserConfiguration(this)); DateTimeAltParser = new BaseDateTimeAltParser(new ItalianDateTimeAltParserConfiguration(this)); }
public FrenchCommonDateTimeParserConfiguration(DateTimeOptions options) : base(options) { UtilityConfiguration = new FrenchDatetimeUtilityConfiguration(); UnitMap = DateTimeDefinitions.UnitMap.ToImmutableDictionary(); UnitValueMap = DateTimeDefinitions.UnitValueMap.ToImmutableDictionary(); SeasonMap = DateTimeDefinitions.SeasonMap.ToImmutableDictionary(); CardinalMap = DateTimeDefinitions.CardinalMap.ToImmutableDictionary(); DayOfWeek = DateTimeDefinitions.DayOfWeek.ToImmutableDictionary(); MonthOfYear = DateTimeDefinitions.MonthOfYear.ToImmutableDictionary(); Numbers = DateTimeDefinitions.Numbers.ToImmutableDictionary(); DoubleNumbers = DateTimeDefinitions.DoubleNumbers.ToImmutableDictionary(); WrittenDecades = DateTimeDefinitions.WrittenDecades.ToImmutableDictionary(); SpecialDecadeCases = DateTimeDefinitions.SpecialDecadeCases.ToImmutableDictionary(); CardinalExtractor = new CardinalExtractor(); IntegerExtractor = new IntegerExtractor(); OrdinalExtractor = new OrdinalExtractor(); NumberParser = new BaseNumberParser(new FrenchNumberParserConfiguration()); DateExtractor = new BaseDateExtractor(new FrenchDateExtractorConfiguration()); TimeExtractor = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration()); DateTimeExtractor = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration()); DurationExtractor = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration()); DatePeriodExtractor = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration()); TimePeriodExtractor = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration()); DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new FrenchDateTimePeriodExtractorConfiguration()); DateParser = new BaseDateParser(new FrenchDateParserConfiguration(this)); TimeParser = new BaseTimeParser(new FrenchTimeParserConfiguration(this)); DateTimeParser = new BaseDateTimeParser(new FrenchDateTimeParserConfiguration(this)); DurationParser = new BaseDurationParser(new FrenchDurationParserConfiguration(this)); DatePeriodParser = new BaseDatePeriodParser(new FrenchDatePeriodParserConfiguration(this)); TimePeriodParser = new BaseTimePeriodParser(new FrenchTimePeriodParserConfiguration(this)); DateTimePeriodParser = new BaseDateTimePeriodParser(new FrenchDateTimePeriodParserConfiguration(this)); DateTimeAltParser = new BaseDateTimeAltParser(new FrenchDateTimeAltParserConfiguration(this)); }
public SpanishTimePeriodExtractorConfiguration() : base(DateTimeOptions.None) { SingleTimeExtractor = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration()); UtilityConfiguration = new SpanishDatetimeUtilityConfiguration(); IntegerExtractor = Number.English.IntegerExtractor.GetInstance(); }
public FrenchTimePeriodExtractorConfiguration() { SingleTimeExtractor = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration()); UtilityConfiguration = new FrenchDatetimeUtilityConfiguration(); }
public GermanTimePeriodExtractorConfiguration() : base(DateTimeOptions.None) { SingleTimeExtractor = new BaseTimeExtractor(new GermanTimeExtractorConfiguration()); UtilityConfiguration = new GermanDatetimeUtilityConfiguration(); IntegerExtractor = Number.German.IntegerExtractor.GetInstance(); }
public FrenchTimePeriodExtractorConfiguration() { SingleTimeExtractor = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration()); UtilityConfiguration = new FrenchDatetimeUtilityConfiguration(); IntegerExtractor = Number.English.IntegerExtractor.GetInstance(); }
public SpanishTimePeriodExtractorConfiguration() { SingleTimeExtractor = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration()); UtilityConfiguration = new SpanishDatetimeUtilityConfiguration(); }
public EnglishDateTimeExtractorConfiguration() { DatePointExtractor = new BaseDateExtractor(new EnglishDateExtractorConfiguration()); TimePointExtractor = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration()); }
public EnglishTimePeriodExtractorConfiguration() { SingleTimeExtractor = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration()); }