Skip to main content

A simple Python package to calculate word error rate (WER).

Project description

pywer

pytest

Pywer is a simple Python package to calculate word error rate (WER). Pywer can also calculate character error rate (CER).

Install

pip install pywer

Usage

import pywer

references = [
    "this is a simple python package",
    "it calculates word error rate",
    "it can also calculate cer",
]
hypotheses = [
    "this is the simple python package",
    "it calculates word error",
    "it can also calculate see er",
]

wer = pywer.wer(references, hypotheses)
cer = pywer.cer(references, hypotheses)
print(f"WER: {wer:.2f}, CER: {cer:.2f}")

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

pywer-0.1.1.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pywer-0.1.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pywer-0.1.1.tar.gz.

File metadata

  • Download URL: pywer-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.1

File hashes

Hashes for pywer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 15a88defbd31ecb04c10efa161b4092a2c8e9518f2f81ec9e74a26cf2ae5d7bd
MD5 a78a9ec892ed836117626541ff2150ad
BLAKE2b-256 80c9f6cdd6e64f345fb0f5dd90d921d95cde6f48f4e11392f49406af34105941

See more details on using hashes here.

File details

Details for the file pywer-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pywer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.1

File hashes

Hashes for pywer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3dd68ad7d16704e96defdb633f6c205314b0063d32e1e9e6907ba1b9fddef8d0
MD5 250e99262f2b186a79b1130f24e29535
BLAKE2b-256 388f738ab294b366badfcfdea398d13aa8b9d27ec6e5a4d2d86b3d78ee3d533e

See more details on using hashes here.

Supported by

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