public EnglishCommonDateTimeParserConfiguration()
        {
            UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();

            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();

            CardinalExtractor = Number.English.CardinalExtractor.GetInstance();
            IntegerExtractor  = Number.English.IntegerExtractor.GetInstance();
            OrdinalExtractor  = Number.English.OrdinalExtractor.GetInstance();

            NumberParser            = new BaseNumberParser(new EnglishNumberParserConfiguration());
            DateExtractor           = new BaseDateExtractor(new EnglishDateExtractorConfiguration());
            TimeExtractor           = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
            DateTimeExtractor       = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration());
            DurationExtractor       = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration());
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration());
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new EnglishTimePeriodExtractorConfiguration());
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new EnglishDateTimePeriodExtractorConfiguration());
            DurationParser          = new BaseDurationParser(new EnglishDurationParserConfiguration(this));
            DateParser           = new BaseDateParser(new EnglishDateParserConfiguration(this));
            TimeParser           = new TimeParser(new EnglishTimeParserConfiguration(this));
            DateTimeParser       = new BaseDateTimeParser(new EnglishDateTimeParserConfiguration(this));
            DatePeriodParser     = new BaseDatePeriodParser(new EnglishDatePeriodParserConfiguration(this));
            TimePeriodParser     = new BaseTimePeriodParser(new EnglishTimePeriodParserConfiguration(this));
            DateTimePeriodParser = new BaseDateTimePeriodParser(new EnglishDateTimePeriodParserConfiguration(this));
        }
 public EnglishDateTimeExtractorConfiguration()
 {
     DatePointExtractor   = new BaseDateExtractor(new EnglishDateExtractorConfiguration());
     TimePointExtractor   = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
     DurationExtractor    = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration());
     UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();
 }
Exemplo n.º 3
0
 public EnglishCommonDateTimeParserConfiguration()
 {
     UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();
     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 EnglishNumberParserConfiguration());
     DateExtractor           = new BaseDateExtractor(new EnglishDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
     DateTimeExtractor       = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration());
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new EnglishTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new EnglishDateTimePeriodExtractorConfiguration());
     DateParser              = new BaseDateParser(new EnglishDateParserConfiguration(this));
     TimeParser              = new TimeParser(new EnglishTimeParserConfiguration(this));
     DateTimeParser          = new BaseDateTimeParser(new EnglishDateTimeParserConfiguration(this));
     DurationParser          = new BaseDurationParser(new EnglishDurationParserConfiguration(this));
     DatePeriodParser        = new BaseDatePeriodParser(new EnglishDatePeriodParserConfiguration(this));
     TimePeriodParser        = new BaseTimePeriodParser(new EnglishTimePeriodParserConfiguration(this));
     DateTimePeriodParser    = new BaseDateTimePeriodParser(new EnglishDateTimePeriodParserConfiguration(this));
 }
Exemplo n.º 4
0
 public EnglishDateExtractorConfiguration()
 {
     IntegerExtractor     = Number.English.IntegerExtractor.GetInstance();
     OrdinalExtractor     = Number.English.OrdinalExtractor.GetInstance();
     NumberParser         = new BaseNumberParser(new EnglishNumberParserConfiguration());
     DurationExtractor    = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration());
     UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();
 }
Exemplo n.º 5
0
 public EnglishDateTimeExtractorConfiguration(DateTimeOptions options = DateTimeOptions.None) : base(options)
 {
     IntegerExtractor     = Number.English.IntegerExtractor.GetInstance();
     DatePointExtractor   = new BaseDateExtractor(new EnglishDateExtractorConfiguration());
     TimePointExtractor   = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
     DurationExtractor    = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration());
     UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();
 }
 public EnglishTimePeriodExtractorConfiguration() : base(DateTimeOptions.None)
 {
     SingleTimeExtractor  = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
     UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();
     IntegerExtractor     = Number.English.IntegerExtractor.GetInstance();
 }
 public EnglishTimePeriodExtractorConfiguration()
 {
     SingleTimeExtractor  = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
     UtilityConfiguration = new EnlighDatetimeUtilityConfiguration();
 }