Socket
Socket
Sign inDemoInstall

@microsoft/recognizers-text-suite

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/recognizers-text-suite

recognizers-text-suite provides robust recognition and resolution of numbers, units, and date/time expressed in multiple languages. Support for English, Spanish, and Chinese (full); and French and Portuguese (partial).


Version published
Weekly downloads
69K
increased by9.03%
Maintainers
2
Weekly downloads
 
Created
Source

Microsoft.Recognizers.Text for JavaScript

Getting Started

Recognizer's are organized into groups and designed to be used in C# and Node.js to help you build great applications!

To use the samples, install the recognizers-text-suite package.

Installation from NPM

Install all the Recognizer's by launching the following command:

  • Get all the Recognizers in a single module: npm install recognizers-text-suite

Or, if you prefer to use a single type of recognizer:

  • Get only the numbers Recognizer's features: npm install recognizers-text-number

  • Get only the numbers with units Recognizer's features: npm install recognizers-text-number-with-unit

  • Get only the date and time Recognizer's features: npm install recognizers-text-date-time

API Documentation

Once the proper package is installed, you'll need to reference the package:

var Recognizers = require('recognizers-text-suite');

Microsoft.Recognizers.Text.Number

  • NumberModel

    This recognizer will find any number from the input. E.g. "I have two apples" will return "2".

    Recognizers.NumberRecognizer.instance.getNumberModel(Recognizers.Culture.English)

  • OrdinalModel

    This recognizer will find any ordinal number. E.g. "eleventh" will return "11".

    Recognizers.NumberRecognizer.instance.getOrdinalModel(Recognizers.Culture.English)

  • PercentageModel

    This recognizer will find any number presented as percentage. E.g. "one hundred percents" will return "100%".

    Recognizers.NumberRecognizer.instance.getPercentageModel(Recognizers.Culture.English)

Microsoft.Recognizers.Text.NumberWithUnit

  • AgeModel

    This recognizer will find any age number presented. E.g. "After ninety five years of age, perspectives change" will return "95 Year".

    Recognizers.NumberWithUnitRecognizer.instance.getAgeModel(Recognizers.Culture.English)

  • CurrencyModel

    This recognizer will find any currency presented. E.g. "Interest expense in the 1988 third quarter was $ 75.3 million" will return "75300000 Dollar".

    Recognizers.NumberWithUnitRecognizer.instance.getCurrencyModel(Recognizers.Culture.English)

  • DimensionModel

    This recognizer will find any dimension presented. E.g. "The six-mile trip to my airport hotel that had taken 20 minutes earlier in the day took more than three hours." will return "6 Mile".

    Recognizers.NumberWithUnitRecognizer.instance.getDimensionModel(Recognizers.Culture.English)

  • TemperatureModel

    This recognizer will find any temperature presented. E.g. "Set the temperature to 30 degrees celsius" will return "30 C".

    Recognizers.NumberWithUnitRecognizer.instance.getTemperatureModel(Recognizers.Culture.English)

Microsoft.Recognizers.Text.DateTime

  • DateTimeModel

    This model will find any date, time, duration and date/time ranges, even if its write in coloquial language. E.g. "I'll go back 8pm today" will return "2017-10-04 20:00:00".

    Recognizers.DateTimeRecognizer.instance.getDateTimeModel(Recognizers.Culture.English)

Samples

Start using recognizers!

Keywords

FAQs

Package last updated on 05 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc