Skip to main content

IAMAI ASR Post Process Library

Project description

nlp-text-corrector is a python package that helps post process the raw ASR output

  • Parsing of numbers expressed as words in English and convert them to integer values.

  • Detection of ordinal, cardinal and decimal numbers in a stream of Englishwords and get their decimal digit representations.

  • Detection of email/website addresses as words in English and convert them to proper email/website format.

  • Detection of times expressed as raw text in English to proper time format.

Compatibility

Tested on python 3.7. Requires Python >= 3.6.

License

This sofware is distributed under the MIT license of which you should have received a copy (see LICENSE file in this repository).

Installation

nlp-text-corrector does not depend on any other third party package.

To install nlp-text-corrector in your (virtual) environment:

pip install nlp-text-corrector

That’s all folks!

Usage examples

Parse and convert

Examples:

>>> from nlp_text_corrector import asr_post_process

>>> asr_post_process.convert("Book twenty first century marvel movie for my two kids of age nine and thirteen at eight twenty two pm tonight")
Book 21st century marvel movie for my 2 kids of age 9 and 13 at 8:22 pm tonight

>>> asr_post_process.convert("fifty-one million five hundred seventy-eight thousand three hundred two")
51578302

>>> asr_post_process.convert("eighty-one")
81

>>> asr_post_process.convert("On May twenty-third , I bought twenty-five cows, twelve chickens and one hundred twenty five point four zero kg of potatoes.")
On May 23rd, I bought 25 cows, 12 chickens and 125.40 kg of potatoes.

Contribute

Join us on https://github.com/iAmPlus/nlp-text-corrector

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nlp_text_corrector-0.0.3.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

nlp_text_corrector-0.0.3-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page