public TurkishSetExtractorConfiguration(IOptionsConfiguration config)
     : base(config)
 {
     DurationExtractor       = new BaseDurationExtractor(new TurkishDurationExtractorConfiguration(this));
     TimeExtractor           = new BaseTimeExtractor(new TurkishTimeExtractorConfiguration(this));
     DateExtractor           = new BaseDateExtractor(new TurkishDateExtractorConfiguration(this));
     DateTimeExtractor       = new BaseDateTimeExtractor(new TurkishDateTimeExtractorConfiguration(this));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new TurkishDatePeriodExtractorConfiguration(this));
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new TurkishTimePeriodExtractorConfiguration(this));
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new TurkishDateTimePeriodExtractorConfiguration(this));
 }
 public ItalianSetExtractorConfiguration(IOptionsConfiguration config)
     : base(config)
 {
     DurationExtractor       = new BaseDurationExtractor(new ItalianDurationExtractorConfiguration(this));
     TimeExtractor           = new BaseTimeExtractor(new ItalianTimeExtractorConfiguration(this));
     DateExtractor           = new BaseDateExtractor(new ItalianDateExtractorConfiguration(this));
     DateTimeExtractor       = new BaseDateTimeExtractor(new ItalianDateTimeExtractorConfiguration(this));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new ItalianDatePeriodExtractorConfiguration(this));
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new ItalianTimePeriodExtractorConfiguration(this));
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new ItalianDateTimePeriodExtractorConfiguration(this));
 }
        public GermanDateTimePeriodExtractorConfiguration(IOptionsConfiguration config) : base(config)
        {
            TokenBeforeDate = DateTimeDefinitions.TokenBeforeDate;

            CardinalExtractor       = Number.German.CardinalExtractor.GetInstance();
            SingleDateExtractor     = new BaseDateExtractor(new GermanDateExtractorConfiguration(this));
            SingleTimeExtractor     = new BaseTimeExtractor(new GermanTimeExtractorConfiguration(this));
            SingleDateTimeExtractor = new BaseDateTimeExtractor(new GermanDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new GermanDurationExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new GermanTimePeriodExtractorConfiguration(this));
        }
 public FrenchMergedExtractorConfiguration()
 {
     DateExtractor           = new BaseDateExtractor(new FrenchDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration());
     DateTimeExtractor       = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration());
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new FrenchDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration());
     GetExtractor            = new BaseSetExtractor(new FrenchSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new FrenchHolidayExtractorConfiguration());
 }
        public TurkishDateTimePeriodExtractorConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            TokenBeforeDate = DateTimeDefinitions.TokenListBeforeDate;

            CardinalExtractor       = Number.Turkish.CardinalExtractor.GetInstance();
            SingleDateExtractor     = new BaseDateExtractor(new TurkishDateExtractorConfiguration(this));
            SingleTimeExtractor     = new BaseTimeExtractor(new TurkishTimeExtractorConfiguration(this));
            SingleDateTimeExtractor = new BaseDateTimeExtractor(new TurkishDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new TurkishDurationExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new TurkishTimePeriodExtractorConfiguration(this));
        }
        public SpanishDateTimePeriodExtractorConfiguration() : base(DateTimeOptions.None)
        {
            TokenBeforeDate = DateTimeDefinitions.TokenBeforeDate;

            CardinalExtractor = Number.Spanish.CardinalExtractor.GetInstance();

            SingleDateExtractor     = new BaseDateExtractor(new SpanishDateExtractorConfiguration());
            SingleTimeExtractor     = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration());
            SingleDateTimeExtractor = new BaseDateTimeExtractor(new SpanishDateTimeExtractorConfiguration());
            DurationExtractor       = new BaseDurationExtractor(new SpanishDurationExtractorConfiguration());
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new SpanishTimePeriodExtractorConfiguration());
        }
        public SwedishCommonDateTimeParserConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            UtilityConfiguration = new SwedishDatetimeUtilityConfiguration();

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

            var numOptions = NumberOptions.None;

            if ((config.Options & DateTimeOptions.NoProtoCache) != 0)
            {
                numOptions = NumberOptions.NoProtoCache;
            }

            var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions);

            CardinalExtractor = Number.Swedish.CardinalExtractor.GetInstance(numConfig);
            IntegerExtractor  = Number.Swedish.IntegerExtractor.GetInstance(numConfig);
            OrdinalExtractor  = Number.Swedish.OrdinalExtractor.GetInstance(numConfig);

            NumberParser = new BaseNumberParser(new SwedishNumberParserConfiguration(numConfig));

            TimeZoneParser = new BaseTimeZoneParser(new SwedishTimeZoneParserConfiguration(this));

            // Do not change order. The order of initialization can lead to side-effects
            DateExtractor           = new BaseDateExtractor(new SwedishDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new SwedishTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new SwedishDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new SwedishDurationExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new SwedishDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new SwedishTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new SwedishDateTimePeriodExtractorConfiguration(this));

            DurationParser       = new BaseDurationParser(new SwedishDurationParserConfiguration(this));
            DateParser           = new BaseDateParser(new SwedishDateParserConfiguration(this));
            TimeParser           = new TimeParser(new SwedishTimeParserConfiguration(this));
            DateTimeParser       = new BaseDateTimeParser(new SwedishDateTimeParserConfiguration(this));
            DatePeriodParser     = new BaseDatePeriodParser(new SwedishDatePeriodParserConfiguration(this));
            TimePeriodParser     = new BaseTimePeriodParser(new SwedishTimePeriodParserConfiguration(this));
            DateTimePeriodParser = new BaseDateTimePeriodParser(new SwedishDateTimePeriodParserConfiguration(this));

            DateTimeAltParser = new BaseDateTimeAltParser(new SwedishDateTimeAltParserConfiguration(this));
        }
Esempio n. 8
0
 public SpanishMergedExtractorConfiguration()
 {
     DateExtractor           = new BaseDateExtractor(new SpanishDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration());
     DateTimeExtractor       = new BaseDateTimeExtractor(new SpanishDateTimeExtractorConfiguration());
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new SpanishDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new SpanishTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new SpanishDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new SpanishDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new SpanishSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new SpanishHolidayExtractorConfiguration());
 }
Esempio n. 9
0
        public FrenchDateTimePeriodExtractorConfiguration(IOptionsConfiguration config)
            : base(config)
        {
            TokenBeforeDate = DateTimeDefinitions.TokenBeforeDate;

            CardinalExtractor       = Number.English.CardinalExtractor.GetInstance();
            SingleDateExtractor     = new BaseDateExtractor(new FrenchDateExtractorConfiguration(this));
            SingleTimeExtractor     = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration(this));
            SingleDateTimeExtractor = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new FrenchTimeZoneExtractorConfiguration(this));
        }
 public SpanishMergedExtractorConfiguration(DateTimeOptions options) : base(options)
 {
     DateExtractor           = new BaseDateExtractor(new SpanishDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration(options));
     DateTimeExtractor       = new BaseDateTimeExtractor(new SpanishDateTimeExtractorConfiguration(options));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new SpanishDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new SpanishTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new SpanishDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new SpanishDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new SpanishSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new SpanishHolidayExtractorConfiguration());
     IntegerExtractor        = new Number.Spanish.IntegerExtractor();
 }
 public PortugueseMergedExtractorConfiguration(DateTimeOptions options) : base(options)
 {
     DateExtractor           = new BaseDateExtractor(new PortugueseDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new PortugueseTimeExtractorConfiguration());
     DateTimeExtractor       = new BaseDateTimeExtractor(new PortugueseDateTimeExtractorConfiguration());
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new PortugueseDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new PortugueseTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new PortugueseDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new PortugueseDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new PortugueseSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new PortugueseHolidayExtractorConfiguration());
     IntegerExtractor        = new Number.Portuguese.IntegerExtractor();
 }
 public GermanMergedExtractorConfiguration(DateTimeOptions options) : base(options)
 {
     DateExtractor           = new BaseDateExtractor(new GermanDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new GermanTimeExtractorConfiguration(options));
     DateTimeExtractor       = new BaseDateTimeExtractor(new GermanDateTimeExtractorConfiguration(options));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new GermanDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new GermanTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new GermanDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new GermanDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new GermanSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new GermanHolidayExtractorConfiguration());
     IntegerExtractor        = Number.German.IntegerExtractor.GetInstance();
 }
 public EnglishMergedExtractorConfiguration()
 {
     DateExtractor           = new BaseDateExtractor(new EnglishDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration());
     DateTimeExtractor       = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration());
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new EnglishTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new EnglishDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new EnglishSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new EnglishHolidayExtractorConfiguration());
     IntegerExtractor        = Number.English.IntegerExtractor.GetInstance();
 }
 public FrenchMergedExtractorConfiguration(DateTimeOptions options) : base(options)
 {
     DateExtractor           = new BaseDateExtractor(new FrenchDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration(options));
     DateTimeExtractor       = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration(options));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new FrenchDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new FrenchSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new FrenchHolidayExtractorConfiguration());
     DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new FrenchDateTimeAltExtractorConfiguration());
     IntegerExtractor        = new Number.French.IntegerExtractor();
 }
        public HindiCommonDateTimeParserConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            UtilityConfiguration = new HindiDatetimeUtilityConfiguration();

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

            var numOptions = NumberOptions.None;

            if ((config.Options & DateTimeOptions.NoProtoCache) != 0)
            {
                numOptions = NumberOptions.NoProtoCache;
            }

            var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions);

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

            NumberParser = new BaseIndianNumberParser(new HindiNumberParserConfiguration(numConfig));

            TimeZoneParser = new BaseTimeZoneParser();

            DateExtractor           = new BaseDateExtractor(new HindiDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new HindiTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new HindiDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new HindiDurationExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new HindiDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new HindiTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new HindiDateTimePeriodExtractorConfiguration(this));
            DurationParser          = new BaseDurationParser(new HindiDurationParserConfiguration(this));
            DateParser           = new BaseDateParser(new HindiDateParserConfiguration(this));
            TimeParser           = new TimeParser(new HindiTimeParserConfiguration(this));
            DateTimeParser       = new BaseDateTimeParser(new HindiDateTimeParserConfiguration(this));
            DatePeriodParser     = new BaseDatePeriodParser(new HindiDatePeriodParserConfiguration(this));
            TimePeriodParser     = new BaseTimePeriodParser(new HindiTimePeriodParserConfiguration(this));
            DateTimePeriodParser = new BaseDateTimePeriodParser(new HindiDateTimePeriodParserConfiguration(this));
            DateTimeAltParser    = new BaseDateTimeAltParser(new HindiDateTimeAltParserConfiguration(this));
        }
Esempio n. 16
0
        public PortugueseDateTimePeriodExtractorConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            TokenBeforeDate = DateTimeDefinitions.TokenBeforeDate;

            CardinalExtractor = Number.Portuguese.CardinalExtractor.GetInstance();

            SingleDateExtractor     = new BaseDateExtractor(new PortugueseDateExtractorConfiguration(this));
            SingleTimeExtractor     = new BaseTimeExtractor(new PortugueseTimeExtractorConfiguration(this));
            SingleDateTimeExtractor = new BaseDateTimeExtractor(new PortugueseDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new PortugueseDurationExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new PortugueseTimePeriodExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new PortugueseTimeZoneExtractorConfiguration(this));
        }
Esempio n. 17
0
 public ItalianMergedExtractorConfiguration(DateTimeOptions options) : base(options)
 {
     DateExtractor           = new BaseDateExtractor(new ItalianDateExtractorConfiguration());
     TimeExtractor           = new BaseTimeExtractor(new ItalianTimeExtractorConfiguration(options));
     DateTimeExtractor       = new BaseDateTimeExtractor(new ItalianDateTimeExtractorConfiguration(options));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new ItalianDatePeriodExtractorConfiguration());
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new ItalianTimePeriodExtractorConfiguration());
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new ItalianDateTimePeriodExtractorConfiguration());
     DurationExtractor       = new BaseDurationExtractor(new ItalianDurationExtractorConfiguration());
     SetExtractor            = new BaseSetExtractor(new ItalianSetExtractorConfiguration());
     HolidayExtractor        = new BaseHolidayExtractor(new ItalianHolidayExtractorConfiguration());
     DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new ItalianDateTimeAltExtractorConfiguration());
     IntegerExtractor        = new Number.Italian.IntegerExtractor();
 }
Esempio n. 18
0
        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();

            var numOptions = NumberOptions.None;

            if ((config.Options & DateTimeOptions.NoProtoCache) != 0)
            {
                numOptions = NumberOptions.NoProtoCache;
            }

            var numConfig = new BaseNumberOptionsConfiguration(config.Culture, numOptions);

            CardinalExtractor = Number.French.CardinalExtractor.GetInstance(numConfig);
            IntegerExtractor  = Number.French.IntegerExtractor.GetInstance(numConfig);
            OrdinalExtractor  = Number.French.OrdinalExtractor.GetInstance(numConfig);

            NumberParser = new BaseNumberParser(new FrenchNumberParserConfiguration(numConfig));

            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));
        }
Esempio n. 19
0
 public ItalianMergedExtractorConfiguration(IOptionsConfiguration config) : base(config)
 {
     DateExtractor           = new BaseDateExtractor(new ItalianDateExtractorConfiguration(this));
     TimeExtractor           = new BaseTimeExtractor(new ItalianTimeExtractorConfiguration(this));
     DateTimeExtractor       = new BaseDateTimeExtractor(new ItalianDateTimeExtractorConfiguration(this));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new ItalianDatePeriodExtractorConfiguration(this));
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new ItalianTimePeriodExtractorConfiguration(this));
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new ItalianDateTimePeriodExtractorConfiguration(this));
     DurationExtractor       = new BaseDurationExtractor(new ItalianDurationExtractorConfiguration(this));
     SetExtractor            = new BaseSetExtractor(new ItalianSetExtractorConfiguration(this));
     HolidayExtractor        = new BaseHolidayExtractor(new ItalianHolidayExtractorConfiguration(this));
     TimeZoneExtractor       = new BaseTimeZoneExtractor(new ItalianTimeZoneExtractorConfiguration(this));
     DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new ItalianDateTimeAltExtractorConfiguration(this));
     IntegerExtractor        = Number.Italian.IntegerExtractor.GetInstance();
 }
Esempio n. 20
0
 public FrenchMergedExtractorConfiguration(IDateTimeOptionsConfiguration config)
     : base(config)
 {
     DateExtractor           = new BaseDateExtractor(new FrenchDateExtractorConfiguration(this));
     TimeExtractor           = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration(this));
     DateTimeExtractor       = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration(this));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration(this));
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration(this));
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new FrenchDateTimePeriodExtractorConfiguration(this));
     DurationExtractor       = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration(this));
     SetExtractor            = new BaseSetExtractor(new FrenchSetExtractorConfiguration(this));
     HolidayExtractor        = new BaseHolidayExtractor(new FrenchHolidayExtractorConfiguration(this));
     TimeZoneExtractor       = new BaseTimeZoneExtractor(new FrenchTimeZoneExtractorConfiguration(this));
     DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new FrenchDateTimeAltExtractorConfiguration(this));
     IntegerExtractor        = Number.French.IntegerExtractor.GetInstance();
 }
 public PortugueseMergedExtractorConfiguration(IDateTimeOptionsConfiguration config)
     : base(config)
 {
     DateExtractor           = new BaseDateExtractor(new PortugueseDateExtractorConfiguration(this));
     TimeExtractor           = new BaseTimeExtractor(new PortugueseTimeExtractorConfiguration(this));
     DateTimeExtractor       = new BaseDateTimeExtractor(new PortugueseDateTimeExtractorConfiguration(this));
     DatePeriodExtractor     = new BaseDatePeriodExtractor(new PortugueseDatePeriodExtractorConfiguration(this));
     TimePeriodExtractor     = new BaseTimePeriodExtractor(new PortugueseTimePeriodExtractorConfiguration(this));
     DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new PortugueseDateTimePeriodExtractorConfiguration(this));
     DurationExtractor       = new BaseDurationExtractor(new PortugueseDurationExtractorConfiguration(this));
     SetExtractor            = new BaseSetExtractor(new PortugueseSetExtractorConfiguration(this));
     HolidayExtractor        = new BaseHolidayExtractor(new PortugueseHolidayExtractorConfiguration(this));
     TimeZoneExtractor       = new BaseTimeZoneExtractor(new PortugueseTimeZoneExtractorConfiguration(this));
     IntegerExtractor        = Number.Portuguese.IntegerExtractor.GetInstance();
     DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new PortugueseDateTimeAltExtractorConfiguration(this));
 }
Esempio n. 22
0
        public GermanMergedExtractorConfiguration(DateTimeOptions options) : base(options)
        {
            DateExtractor           = new BaseDateExtractor(new GermanDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new GermanTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new GermanDateTimeExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new GermanDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new GermanTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new GermanDateTimePeriodExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new GermanDurationExtractorConfiguration(this));
            SetExtractor            = new BaseSetExtractor(new GermanSetExtractorConfiguration(this));
            HolidayExtractor        = new BaseHolidayExtractor(new GermanHolidayExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new GermanTimeZoneExtractorConfiguration(this));
            IntegerExtractor        = Number.German.IntegerExtractor.GetInstance();
            DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new GermanDateTimeAltExtractorConfiguration(this));

            AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict);
        }
Esempio n. 23
0
        public FrenchMergedExtractorConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            DateExtractor           = new BaseDateExtractor(new FrenchDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new FrenchTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new FrenchDateTimeExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new FrenchDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new FrenchTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new FrenchDateTimePeriodExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new FrenchDurationExtractorConfiguration(this));
            SetExtractor            = new BaseSetExtractor(new FrenchSetExtractorConfiguration(this));
            HolidayExtractor        = new BaseHolidayExtractor(new FrenchHolidayExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new FrenchTimeZoneExtractorConfiguration(this));
            DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new FrenchDateTimeAltExtractorConfiguration(this));
            IntegerExtractor        = Number.French.IntegerExtractor.GetInstance();

            AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict);
        }
        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 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);
            // }
        }
Esempio n. 26
0
        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));
        }
Esempio n. 28
0
        public EnglishCommonDateTimeParserConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            UtilityConfiguration = new EnglishDatetimeUtilityConfiguration();

            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.English.CardinalExtractor.GetInstance();
            IntegerExtractor  = Number.English.IntegerExtractor.GetInstance();
            OrdinalExtractor  = Number.English.OrdinalExtractor.GetInstance();

            TimeZoneParser          = new BaseTimeZoneParser();
            NumberParser            = new BaseNumberParser(new EnglishNumberParserConfiguration(new BaseNumberOptionsConfiguration(config.Culture)));
            DateExtractor           = new BaseDateExtractor(new EnglishDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new EnglishTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new EnglishDateTimePeriodExtractorConfiguration(this));
            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));
            DateTimeAltParser    = new BaseDateTimeAltParser(new EnglishDateTimeAltParserConfiguration(this));
        }
        public ItalianCommonDateTimeParserConfiguration(IOptionsConfiguration options)
            : base(options)
        {
            UtilityConfiguration = new ItalianDatetimeUtilityConfiguration();

            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.Italian.CardinalExtractor.GetInstance();
            IntegerExtractor = Number.Italian.IntegerExtractor.GetInstance();
            OrdinalExtractor = Number.Italian.OrdinalExtractor.GetInstance();

            NumberParser = new BaseNumberParser(new ItalianNumberParserConfiguration());
            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 BaseTimeParser(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));
        }
Esempio n. 30
0
        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);
            }
        }