Skip to main content

A small python implementation of common ASR corrections

Project description

CC - CommonCorrections

A simple repo that is used to correct common ASR outputs. The aim is not on mistakes but different ways of transcribing the same thing with a focus on how something may sound as opposed to the shortened form. The primary use case is to align the ground-truth and output from ASRs just before the WER is calculated.

Static Examples

there's -> there is
google.com -> google dot com

Dynamic Examples

1 2 3 -> one two three
53.4 -> fifty three point four
23:59 -> twenty three fifty nine

Features

  1. Designed to be used and fast (ish) with Pandas dataframes
  2. Lots of built in corrections for free
  3. Ability to easily extend with private corrections

Getting Started

  1. Install with: pip install commoncorrections
  2. Import with: import commoncorrections
  3. Use with:
>>> wer("the cat sat on the mat", "the mat sat on the cat")
0.3333333333333333

mypy Type Checks

I tested installing mypy to check that types are compatible

(py) rob@rob-T480s:~/projects/CommonCorrections/commoncorrections (master)$ mypy commoncorrections.py
Success: no issues found in 1 source file

Change Log

  • v1.0.0 - First release

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

commoncorrections-1.0.0.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

commoncorrections-1.0.0-py3-none-any.whl (9.5 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