Skip to main content

A high-performance Python package for calculating Word Error Rate (WER), powered by Rust.

Project description

WERx

What is WERx?

WERx is a high-performance Python package for calculating the Word Error Rate (WER), backed by a Rust core. Designed for speed, safety, and production-grade robustness, it supports both corpus-level and sentence-level WER, as well as weighted variations and diagnostic summaries.

🚀 Why Use WERx?

  • Fast: Rust-powered core outperforms many pure Python implementations
  • 🧪 Accurate: Deterministic and tested across thousands of examples
  • 🔒 Safe: Handles edge cases gracefully (empty strings, mismatched lengths, etc.)
  • 🔧 Flexible: Supports weighted insertions, deletions, substitutions
  • 📊 Insightful: Sentence-level breakdowns and alignment diagnostics available

🧩 Installation

You can install WERx either with 'uv' or 'pip'.

Using 'uv' (recommended for modern workflows):

uv pip install werx

Using pip:

pip install werx

✨ Usage

Import the WERx package

Python Code:

import werx

Examples:

1. Single sentence comparison

Python Code:

wer = werx.wer('i love cold pizza', 'i love pizza')
print(wer)

Results Output:

0.25

2. Corpus level Word Error Rate Calculation

Python Code:

ref = ['i love cold pizza','the sugar bear character was popular']
hyp = ['i love pizza','the sugar bare character was popular']
wer = werx.wer(ref, hyp)
print(wer)

Results Output:

0.2

📄 License

This project is licensed under the Apache License 2.0.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

werx-0.1.0-cp313-cp313-win_amd64.whl (134.5 kB view details)

Uploaded CPython 3.13Windows x86-64

werx-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl (260.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

werx-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (222.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

werx-0.1.0-cp312-cp312-win_amd64.whl (134.5 kB view details)

Uploaded CPython 3.12Windows x86-64

werx-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (260.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

werx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (222.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

werx-0.1.0-cp311-cp311-win_amd64.whl (134.4 kB view details)

Uploaded CPython 3.11Windows x86-64

werx-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl (262.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

werx-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (224.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

werx-0.1.0-cp310-cp310-win_amd64.whl (134.4 kB view details)

Uploaded CPython 3.10Windows x86-64

werx-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl (262.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

werx-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (224.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file werx-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 134.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for werx-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 00fd97cd4f59b71c5e7ad9e974b4a2ff3a6f83b6c783883874db99f2464e9039
MD5 8e49eb1dd2394ed08cf2695ce3521a6c
BLAKE2b-256 e08de03505b7585dea2d3c72016f830f10a600d76973ecdb2d0f2fd5706a4156

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 623a0c0ec122aff662b5b5d0453e0b19755acb10ca01140c91cc5ce4cb2f85d9
MD5 c050d095c3c672c38e96269a51a154fc
BLAKE2b-256 e9c674249292d59ecd54a26b71452961a3afa0186ee5931be66ab40895e13b6e

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 784ab37e842cdbbe74a4aa2d4272d543a53a4dddefb8bfd7c9fb141effc90578
MD5 094a8232a90a129401791c9787e2d7ac
BLAKE2b-256 71884130b62cb209a880af249ffe82d12a5133d801bd1242d2c40c6b68d9aa2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 134.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for werx-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d41d9f84fb3714151ea56e1bc1d6ae94c2aadd176a578be95af9618c1e4b91af
MD5 2354ea0719c27d04adf2d1c04b95f86c
BLAKE2b-256 309cc35bc5fa34a84a0fea8d5ea45f7f7f95ab642e295678a77b7fb0d86163bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cb1bd667312db4b0f9f4e2324486cb3ab790582cc90ae83045e7689107b9821c
MD5 6a1467274095148c61439475935ea10b
BLAKE2b-256 bbce059decd10039af6ce1867560b78d917dfbdbc940afad1b6461428dff0c09

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c36b6b9307074e2b3e950eeb3bbcf90d120f43afb975425481e2fbcfb0818431
MD5 35c6c22c53e45d7558666077901240f5
BLAKE2b-256 c2669e88b177558a530f3fa18ff3b33306f31b09038267b66f3e55e000e31e2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 134.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for werx-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 fbc3f9ea0f25ca047c07cbb466a097e5adda4e08eb9f6f55b7a340a55fab988e
MD5 15a3dcaedf025b90db8a172eaa39c2e9
BLAKE2b-256 a7fcb47373e76437fae6d67a1c169109dabab0ff6b259f9b9cbb2d972125761f

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3f3c269d3aede60de708bcb0337ee71f9001b4f8807ecd4697f51ddea64459e2
MD5 aab3cf882a81176b5d32c5b626f307ae
BLAKE2b-256 b757b14fc4e4278d96e71b92e168912e552345dad12c83905e34661f16788db2

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3850fdf869a7be1efbb37791fd247d9189fc143b8d66e10ba10a1c392aa81263
MD5 b9bcee63b0f940c8169f39f7eb1b7b8f
BLAKE2b-256 e4bee846bc165ed325b93cea156cd2e87b74a08828fc2013c607d04d4c366b34

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 134.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for werx-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7171ec8faac8507efa618a7ee31e5ee6cc1603734e6a446e01c72389c285f41b
MD5 1f9c8ecc88934675f8366abeb80ae347
BLAKE2b-256 682ca00102f4939c5cea03abb899fde16937e3588d66279e0b14e58bc777e5aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 0ff29700ae5bc093b09b1d43b725eefff30a66dedb99ca9112e84a5b22693593
MD5 a80fed07218b824cc6d22914d2c5862d
BLAKE2b-256 7291212b06b4ad07324a5b9222b311f8d1eba60d2a562eb6c6ad9ac7f73fdd15

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file werx-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4bd800cb0eecd262161dd1470d1f7d64568f9d4eaf6fbaa52fb733adac005400
MD5 1eb34fcc1c7c415b53a1bc9a5d74104e
BLAKE2b-256 ac2400e4a883fa3d02d744cd11823c05136d939eb77c7455280ed17db473ba6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: CI.yml on analyticsinmotion/werx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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