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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file nlp_text_corrector-0.0.3.tar.gz.

File metadata

  • Download URL: nlp_text_corrector-0.0.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.6

File hashes

Hashes for nlp_text_corrector-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f9e4f0a1e4e1a1ab1908d20904c97812b852d4f520e73e1bebc5dc2d236a4d1b
MD5 7bc9fc9d56f89fd804832ad1f3321efa
BLAKE2b-256 c0abdef33bd0f113a533b0c3775d11f39de14e4bba365c5d15c95dfc49e9ed30

See more details on using hashes here.

File details

Details for the file nlp_text_corrector-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: nlp_text_corrector-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.6

File hashes

Hashes for nlp_text_corrector-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c974f9dfa7130b4b2a17b165d70f3e0011fe9807a02436c5120c588636a9eec8
MD5 53eb5dd5ced9fa04b362edfca832c584
BLAKE2b-256 501f111bdc63d66c51cf843911ac88bcfde7a62d8f67343efdf1004dc8890a50

See more details on using hashes here.

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