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.1-cp313-cp313-win_amd64.whl (134.1 kB view details)

Uploaded CPython 3.13Windows x86-64

werx-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl (260.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

werx-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (222.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

werx-0.1.1-cp312-cp312-win_amd64.whl (134.1 kB view details)

Uploaded CPython 3.12Windows x86-64

werx-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl (260.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

werx-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (222.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

werx-0.1.1-cp311-cp311-win_amd64.whl (134.0 kB view details)

Uploaded CPython 3.11Windows x86-64

werx-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl (261.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

werx-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (224.2 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

werx-0.1.1-cp310-cp310-win_amd64.whl (134.1 kB view details)

Uploaded CPython 3.10Windows x86-64

werx-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl (261.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

werx-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (224.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: werx-0.1.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 134.1 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.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3d3caaf7fd1d3fb22526e5d0c2c95e12d9a49bf6f35b9c70f01ab568b1755b53
MD5 032feb61e2f9db5d22224782a0f45b0d
BLAKE2b-256 d4a884a486c1a88a75311f497a3598e03d11a8dfc88814240cd87c3a200f7adf

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 edf1f34ae3b5e66943eb56b0f02983984f024a545982dea24dbb190f33e50047
MD5 6a75988accb03a4acea26f6ef498dd4f
BLAKE2b-256 c07b0955bf6cf2dd501f6d9ea91e32c88f8e28cf5de6751166571358bb8f938f

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2fe22eca8f7020f0c6eb4262d21a505ee0329146cadfe92ad0f51021cc559fdd
MD5 855d2067ec425bfa309529e6f00f1f3a
BLAKE2b-256 85ab61af2831a4957f2ffa5719c0871b0aab80b91a67fe11342db8df1b4ee8af

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 134.1 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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 08cf2fa933d5baba557ac0449b888500735359c0ee7a70d174833aa1077d6587
MD5 452c44acc4462dd2d0e8617fa19997ca
BLAKE2b-256 dfcd32b9f59d4d39fd1b48190183b3b492a90533c537d997d9c292dd3cc2143f

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 793324cb794f5a58f823f85981d79458535b5b1b0ae8bdede9af0d3ddafdc126
MD5 e334ad8bf2f30ce297bf6564e6f12840
BLAKE2b-256 5e3f0c2950d382b05c2c305dbc8c0e2181705d89d6dc72f16e2d4d81b56c8f44

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee78091b483ba2997ebbc94a28eb958d771a0e470a90690387f76e90e5a33986
MD5 24c54d15bbf491e39513f95b96f613c0
BLAKE2b-256 3caa8dce9ac550ae9284661902c32e2993abc396485ad476207784f4970b2f55

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 134.0 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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 691eaf37e933670f67b8a3dff29f0b23d55341514deb1c8d8ac511044bc4b07d
MD5 238b21d306e913c48634a264675782a2
BLAKE2b-256 b9ce7e2914d0ba2691cacf68bc3ee3c81b094778ac2d3cdd792753831e93ab87

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f25a6e8c313a8aeb488054bd583a0573c1dd59f96abb96435050eaa601c62117
MD5 12402d32d729ae244c7dbd88dd52b4ae
BLAKE2b-256 9d9c051b9d4d4bf1529bdd7c01b7168ac9de9d50c13a9204107f00e4f215391c

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91fe000120476030bbd163d6c253e9083ae5813c3053054a15837302c815074f
MD5 9380ff5d84efeaa01fa43d6a22ad6f86
BLAKE2b-256 552d9401d90040d377ef4e0983b383a0a33ca445801e0296ca2744837a1e4484

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 134.1 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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d0f2f19d924b0b29b83b4faa420265e1e99a4285af674dae1a31ee0b54f72851
MD5 f9fc7448bff35d3d1e6f6af4345c98a6
BLAKE2b-256 0ee40a9c116cd6a88c5d87e00bbea09c7f2a9fa9dd18ca6b39e75e960dbe2a4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c830c58e52c4ee25eb40ebbbc4ed6836dc4a1f0efcd71e3133fdbd563690b014
MD5 b1e35d7a376776e13b9f5446dac43209
BLAKE2b-256 21bf514ebe23f518e9ae466913374fc1bb34b7f1ab67498275b9d85efffebd77

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for werx-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08bc38b43869e92a5c39f013163631acee6e4bf28ca314e13c3495e12df1626f
MD5 90628935d8373bc8824fe40a43794107
BLAKE2b-256 f69d44de3f9aecb66e55802dae6b439949af3d461c59c8adf88eec9fb03b8864

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.1-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