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

            var intExtract = new IntegerExtractor(mode);

            builder.AddRange(intExtract.Regexes);

            var douExtractor = new DoubleExtractor();

            builder.AddRange(douExtractor.Regexes);

            Regexes = builder.ToImmutable();
        }
예제 #2
0
        // 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();
        }