예제 #1
0
        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));
            DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new PortugueseDateTimeAltExtractorConfiguration(this));

            var numOptions = NumberOptions.None;

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

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

            IntegerExtractor = Number.Portuguese.IntegerExtractor.GetInstance(numConfig);
        }
예제 #2
0
        public EnglishMergedExtractorConfiguration(IOptionsConfiguration config) : base(config)
        {
            DateExtractor           = new BaseDateExtractor(new EnglishDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new EnglishTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new EnglishDateTimeExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new EnglishDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new EnglishTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new EnglishDateTimePeriodExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new EnglishDurationExtractorConfiguration(this));
            SetExtractor            = new BaseSetExtractor(new EnglishSetExtractorConfiguration(this));
            HolidayExtractor        = new BaseHolidayExtractor(new EnglishHolidayExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new EnglishTimeZoneExtractorConfiguration(this));
            DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new EnglishDateTimeAltExtractorConfiguration(this));
            IntegerExtractor        = Number.English.IntegerExtractor.GetInstance();

            if ((Options & DateTimeOptions.EnablePreview) != 0)
            {
                SuperfluousWordMatcher.Init(DateTimeDefinitions.SuperfluousWordList);
            }

            var ambiguityFiltersDict = new Dictionary <Regex, Regex>();

            foreach (var item in DateTimeDefinitions.AmbiguityFiltersDict)
            {
                ambiguityFiltersDict.Add(new Regex(item.Key, RegexOptions.IgnoreCase | RegexOptions.Singleline),
                                         new Regex(item.Value, RegexOptions.IgnoreCase | RegexOptions.Singleline));
            }

            AmbiguityFiltersDict = ambiguityFiltersDict;
        }
예제 #3
0
        public SpanishMergedExtractorConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            DateExtractor           = new BaseDateExtractor(new SpanishDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new SpanishTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new SpanishDateTimeExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new SpanishDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new SpanishTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new SpanishDateTimePeriodExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new SpanishDurationExtractorConfiguration(this));
            SetExtractor            = new BaseSetExtractor(new SpanishSetExtractorConfiguration(this));
            DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new SpanishDateTimeAltExtractorConfiguration(this));
            HolidayExtractor        = new BaseHolidayExtractor(new SpanishHolidayExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new SpanishTimeZoneExtractorConfiguration(this));

            var numOptions = NumberOptions.None;

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

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

            IntegerExtractor = Number.Spanish.IntegerExtractor.GetInstance(numConfig);

            AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict);
        }
        public DutchMergedExtractorConfiguration(IDateTimeOptionsConfiguration config)
            : base(config)
        {
            DateExtractor           = new BaseDateExtractor(new DutchDateExtractorConfiguration(this));
            TimeExtractor           = new BaseTimeExtractor(new DutchTimeExtractorConfiguration(this));
            DateTimeExtractor       = new BaseDateTimeExtractor(new DutchDateTimeExtractorConfiguration(this));
            DatePeriodExtractor     = new BaseDatePeriodExtractor(new DutchDatePeriodExtractorConfiguration(this));
            TimePeriodExtractor     = new BaseTimePeriodExtractor(new DutchTimePeriodExtractorConfiguration(this));
            DateTimePeriodExtractor = new BaseDateTimePeriodExtractor(new DutchDateTimePeriodExtractorConfiguration(this));
            DurationExtractor       = new BaseDurationExtractor(new DutchDurationExtractorConfiguration(this));
            SetExtractor            = new BaseSetExtractor(new DutchSetExtractorConfiguration(this));
            HolidayExtractor        = new BaseHolidayExtractor(new DutchHolidayExtractorConfiguration(this));
            TimeZoneExtractor       = new BaseTimeZoneExtractor(new DutchTimeZoneExtractorConfiguration(this));
            DateTimeAltExtractor    = new BaseDateTimeAltExtractor(new DutchDateTimeAltExtractorConfiguration(this));

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

            AmbiguityFiltersDict = DefinitionLoader.LoadAmbiguityFilters(DateTimeDefinitions.AmbiguityFiltersDict);

            if ((Options & DateTimeOptions.EnablePreview) != 0)
            {
                SuperfluousWordMatcher.Init(DateTimeDefinitions.SuperfluousWordList);
            }
        }
 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());
 }
예제 #6
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());
 }
 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 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 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 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 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();
 }
예제 #12
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();
 }
예제 #13
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();
 }
 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));
 }
예제 #15
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();
 }
예제 #16
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);
        }
예제 #17
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);
            }
        }
예제 #19
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);
            }
        }