// CardinalExtractor = Int + Double
        public CardinalExtractor(BaseNumberOptionsConfiguration config, CJKNumberExtractorMode mode = CJKNumberExtractorMode.Default)
        {
            var builder = ImmutableDictionary.CreateBuilder <Regex, TypeTag>();

            var intExtract = new IntegerExtractor(config, mode);

            builder.AddRange(intExtract.Regexes);

            var douExtractor = new DoubleExtractor(config);

            builder.AddRange(douExtractor.Regexes);

            Regexes = builder.ToImmutable();
        }
Exemple #2
0
        // CardinalExtractor = Int + Double
        public CardinalExtractor(JapaneseNumberExtractorMode mode = JapaneseNumberExtractorMode.Default)
        {
            var builder = ImmutableDictionary.CreateBuilder <Regex, string>();

            var intExtract = new IntegerExtractor(mode);

            builder.AddRange(intExtract.Regexes);

            var douExtractor = new DoubleExtractor();

            builder.AddRange(douExtractor.Regexes);

            Regexes = builder.ToImmutable();
        }