character-error-rate

1.1.4 • Public • Published

Character-Error-Rate

npm package for calculating the character-error-rate between two strings to evaluate speech recognition quality. Complexity of levenshtein distance is being improved from O(m*n) to O(min(m,n)).

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
6.4.1
v8.16.0

Installation

BEFORE YOU INSTALL: please read the prerequisites

Install the npm-package

$ npm i character-error-rate

Usage

You can decide if punctuation and capitalization should be considered in the calculation.

 calcCER(reference: string, transcription: string, withPunctuation: boolean, withCapitalization: boolean));
import calcCER from 'character-error-rate';

console.log('CER: ', calcCER('reference text', 'transcription text', true, true));

Authors

  • Henning Weise - Initial work - GitHub
  • Milot Mirdita - Levenshtein distance algorithm - GitHub

License

MIT License © Henning Weise

Package Sidebar

Install

npm i character-error-rate

Weekly Downloads

3

Version

1.1.4

License

MIT

Unpacked Size

7.61 kB

Total Files

8

Last publish

Collaborators

  • henning410