public EnglishMergedExtractorConfiguration(DateTimeOptions options) { Options = options; DateExtractor = new BaseDateExtractor(new EnglishDateExtractorConfiguration(options)); TimeExtractor = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration(options)); DateTimeExtractor = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration(options)); DatePeriodExtractor = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration(options)); 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 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 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 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 PortugueseDateTimeAltExtractorConfiguration(IOptionsConfiguration config) : base(config) { DateExtractor = new BaseDateExtractor(new PortugueseDateExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new PortugueseDatePeriodExtractorConfiguration(this)); }
public SpanishDateTimeAltExtractorConfiguration() { DateExtractor = new BaseDateExtractor(new SpanishDateExtractorConfiguration()); DatePeriodExtractor = new BaseDatePeriodExtractor(new SpanishDatePeriodExtractorConfiguration()); }
public ItalianDateTimeAltExtractorConfiguration(IOptionsConfiguration config) : base(config) { DateExtractor = new BaseDateExtractor(new ItalianDateExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new ItalianDatePeriodExtractorConfiguration(this)); }
public TestDatePeriodParser() { referenceDay = new DateObject(2016, 11, 7); extractor = new BaseDatePeriodExtractor(new SpanishDatePeriodExtractorConfiguration()); parser = new BaseDatePeriodParser(new SpanishDatePeriodParserConfiguration(new SpanishCommonDateTimeParserConfiguration())); }
public HindiDateTimeAltExtractorConfiguration(IDateTimeOptionsConfiguration config) : base(config) { DateExtractor = new BaseDateExtractor(new HindiDateExtractorConfiguration(this)); DatePeriodExtractor = new BaseDatePeriodExtractor(new HindiDatePeriodExtractorConfiguration(this)); }
public PortugueseDateTimeAltExtractorConfiguration() { DateExtractor = new BaseDateExtractor(new PortugueseDateExtractorConfiguration()); DatePeriodExtractor = new BaseDatePeriodExtractor(new PortugueseDatePeriodExtractorConfiguration()); }
public GermanDateTimeAltExtractorConfiguration() { DateExtractor = new BaseDateExtractor(new GermanDateExtractorConfiguration()); DatePeriodExtractor = new BaseDatePeriodExtractor(new GermanDatePeriodExtractorConfiguration()); }
public FrenchDateTimeAltExtractorConfiguration() { DateExtractor = new BaseDateExtractor(new FrenchDateExtractorConfiguration()); DatePeriodExtractor = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration()); }