How to use the @microsoft/recognizers-text-number-with-unit.NumberWithUnitExtractor function in @microsoft/recognizers-text-number-with-unit

To help you get started, we’ve selected a few @microsoft/recognizers-text-number-with-unit 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-date-time / src / dateTime / chinese / durationConfiguration.ts View on Github external
constructor() {
        super(null);
        this.extractor = new NumberWithUnitExtractor(new DurationExtractorConfiguration());
        this.yearRegex = RegExpUtility.getSafeRegExp(ChineseDateTime.DurationYearRegex);
        this.halfSuffixRegex = RegExpUtility.getSafeRegExp(ChineseDateTime.DurationHalfSuffixRegex);
    }