How to use the @microsoft/recognizers-text-number.Culture.French function in @microsoft/recognizers-text-number

To help you get started, we’ve selected a few @microsoft/recognizers-text-number examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / Recognizers-Text / JavaScript / packages / recognizers-number-with-unit / src / numberWithUnit / numberWithUnitRecognizer.ts View on Github external
[new NumberWithUnitExtractor(new EnglishCurrencyExtractorConfiguration()), new NumberWithUnitParser(new EnglishCurrencyParserConfiguration())]
        ])));
        this.registerModel("AgeModel", Culture.Japanese, (options) => new AgeModel(new Map([
            [new NumberWithUnitExtractor(new JapaneseAgeExtractorConfiguration()), new NumberWithUnitParser(new JapaneseAgeParserConfiguration())],
            [new NumberWithUnitExtractor(new EnglishAgeExtractorConfiguration()), new NumberWithUnitParser(new EnglishAgeParserConfiguration())]
        ])));
        // #endregion

        // #region French
        this.registerModel("CurrencyModel", Culture.French, (options) => new CurrencyModel(new Map([
            [new NumberWithUnitExtractor(new FrenchCurrencyExtractorConfiguration()), new NumberWithUnitParser(new FrenchCurrencyParserConfiguration())]
        ])));
        this.registerModel("TemperatureModel", Culture.French, (options) => new TemperatureModel(new Map([
            [new NumberWithUnitExtractor(new FrenchTemperatureExtractorConfiguration()), new NumberWithUnitParser(new FrenchTemperatureParserConfiguration())]
        ])));
        this.registerModel("DimensionModel", Culture.French, (options) => new DimensionModel(new Map([
            [new NumberWithUnitExtractor(new FrenchDimensionExtractorConfiguration()), new NumberWithUnitParser(new FrenchDimensionParserConfiguration())]
        ])));
        this.registerModel("AgeModel", Culture.French, (options) => new AgeModel(new Map([
            [new NumberWithUnitExtractor(new FrenchAgeExtractorConfiguration()), new NumberWithUnitParser(new FrenchAgeParserConfiguration())]
        ])));
        // #endregion
    }
github microsoft / Recognizers-Text / JavaScript / packages / recognizers-number-with-unit / src / numberWithUnit / numberWithUnitRecognizer.ts View on Github external
])));
        // #endregion

        // #region Japanese
        this.registerModel("CurrencyModel", Culture.Japanese, (options) => new CurrencyModel(new Map([
            [new BaseMergedUnitExtractor(new JapaneseCurrencyExtractorConfiguration()), new BaseMergedUnitParser(new JapaneseCurrencyParserConfiguration())],
            [new NumberWithUnitExtractor(new EnglishCurrencyExtractorConfiguration()), new NumberWithUnitParser(new EnglishCurrencyParserConfiguration())]
        ])));
        this.registerModel("AgeModel", Culture.Japanese, (options) => new AgeModel(new Map([
            [new NumberWithUnitExtractor(new JapaneseAgeExtractorConfiguration()), new NumberWithUnitParser(new JapaneseAgeParserConfiguration())],
            [new NumberWithUnitExtractor(new EnglishAgeExtractorConfiguration()), new NumberWithUnitParser(new EnglishAgeParserConfiguration())]
        ])));
        // #endregion

        // #region French
        this.registerModel("CurrencyModel", Culture.French, (options) => new CurrencyModel(new Map([
            [new NumberWithUnitExtractor(new FrenchCurrencyExtractorConfiguration()), new NumberWithUnitParser(new FrenchCurrencyParserConfiguration())]
        ])));
        this.registerModel("TemperatureModel", Culture.French, (options) => new TemperatureModel(new Map([
            [new NumberWithUnitExtractor(new FrenchTemperatureExtractorConfiguration()), new NumberWithUnitParser(new FrenchTemperatureParserConfiguration())]
        ])));
        this.registerModel("DimensionModel", Culture.French, (options) => new DimensionModel(new Map([
            [new NumberWithUnitExtractor(new FrenchDimensionExtractorConfiguration()), new NumberWithUnitParser(new FrenchDimensionParserConfiguration())]
        ])));
        this.registerModel("AgeModel", Culture.French, (options) => new AgeModel(new Map([
            [new NumberWithUnitExtractor(new FrenchAgeExtractorConfiguration()), new NumberWithUnitParser(new FrenchAgeParserConfiguration())]
        ])));
        // #endregion
    }
github microsoft / Recognizers-Text / JavaScript / packages / recognizers-date-time / src / dateTime / dateTimeRecognizer.ts View on Github external
// #region Spanish
        this.registerModel("DateTimeModel", Culture.Spanish, (options) => new DateTimeModel(
            new BaseMergedParser(new SpanishMergedParserConfiguration(), this.Options),
            new BaseMergedExtractor(new SpanishMergedExtractorConfiguration(), this.Options)
        ));
        // #endregion

        // #region Chinese
        this.registerModel("DateTimeModel", Culture.Chinese, (options) => new DateTimeModel(
            new ChineseFullMergedParser(),
            new ChineseMergedExtractor(this.Options)
        ));
        // #endregion

        // #region French
        this.registerModel("DateTimeModel", Culture.French, (options) => new DateTimeModel(
            new BaseMergedParser(new FrenchMergedParserConfiguration(), this.Options),
            new BaseMergedExtractor(new FrenchMergedExtractorConfiguration(), this.Options)
        ));
        // #endregion
    }
github microsoft / Recognizers-Text / JavaScript / packages / recognizers-number-with-unit / src / numberWithUnit / french / currency.ts View on Github external
constructor(ci?: CultureInfo) {
        if (!ci) {
            ci = new CultureInfo(Culture.French);
        }

        super(ci);

        this.extractType = Constants.SYS_UNIT_CURRENCY;

        // Reference Source: https:// en.wikipedia.org/wiki/List_of_circulating_currencies
        this.suffixList = FrenchNumericWithUnit.CurrencySuffixList;
        this.prefixList = FrenchNumericWithUnit.CurrencyPrefixList;
        this.ambiguousUnitList = FrenchNumericWithUnit.AmbiguousCurrencyUnitList;
    }
}
github microsoft / Recognizers-Text / JavaScript / packages / recognizers-number-with-unit / src / numberWithUnit / french / temperature.ts View on Github external
constructor(ci?: CultureInfo) {
        if (!ci) {
            ci = new CultureInfo(Culture.French);
        }

        super(ci);

        this.extractType = Constants.SYS_UNIT_TEMPERATURE;

        this.suffixList = FrenchNumericWithUnit.TemperatureSuffixList;
        this.prefixList = new Map();
        this.ambiguousUnitList = new Array();

        this.ambiguousUnitNumberMultiplierRegex = RegExpUtility.getSafeRegExp(BaseUnits.AmbiguousUnitNumberMultiplierRegex, "gs");
    }
}
github microsoft / Recognizers-Text / JavaScript / packages / recognizers-number-with-unit / src / numberWithUnit / french / dimension.ts View on Github external
constructor(ci?: CultureInfo) {
        if (!ci) {
            ci = new CultureInfo(Culture.French);
        }

        super(ci);

        this.BindDictionary(dimensionSuffixList);
    }
}
github microsoft / Recognizers-Text / JavaScript / packages / recognizers-number-with-unit / src / numberWithUnit / french / age.ts View on Github external
constructor(ci?: CultureInfo) {
        if (!ci) {
            ci = new CultureInfo(Culture.French);
        }

        super(ci);

        this.BindDictionary(FrenchNumericWithUnit.AgeSuffixList);
    }
}

@microsoft/recognizers-text-number

recognizers-text-number provides robust recognition and resolution of numbers expressed in multiple languages.

MIT
Latest version published 1 year ago

Package Health Score

81 / 100
Full package analysis