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 Distribution

werx-0.1.2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distributions

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

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

Uploaded CPython 3.13Windows x86-64

werx-0.1.2-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.2-cp313-cp313-macosx_11_0_arm64.whl (222.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

werx-0.1.2-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.2-cp312-cp312-macosx_11_0_arm64.whl (222.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

werx-0.1.2-cp311-cp311-manylinux_2_34_x86_64.whl (262.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

werx-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (224.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

werx-0.1.2-cp310-cp310-win_amd64.whl (134.5 kB view details)

Uploaded CPython 3.10Windows x86-64

werx-0.1.2-cp310-cp310-manylinux_2_34_x86_64.whl (262.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

werx-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (224.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file werx-0.1.2.tar.gz.

File metadata

  • Download URL: werx-0.1.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for werx-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bda54e7ac2b074ff576bf53851b5ea139087061997d9b0d1f152c03ed6c9e6d7
MD5 1e389a06cd897a21f931b17b3eec2c02
BLAKE2b-256 269427ec8d2c503c716162ae2a49c09fead60a62c664c593fa422cebb0b5ea72

See more details on using hashes here.

Provenance

The following attestation bundles were made for werx-0.1.2.tar.gz:

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.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: werx-0.1.2-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.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 5978036c0f8c447da3a7a7f1448c1967ca98c7f62cb59d29f9221688130cdf87
MD5 00eb066bbfcf97a46287a5df2f4fa8d6
BLAKE2b-256 44f5a7d1496ce89bcbbbeca446673b690298e85292715306f8d92c04d61464a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3d1d90b5902246657e7199dcf866832145eb5ed0e2a644527496af5e14860c6f
MD5 e08a0edfc94061d6d08a8db761dc9481
BLAKE2b-256 ff8633681f9d3f595b4f5e7e469b42fde8ee6b7b0e98b77b93dc9dd71a976d85

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bd1be7343137abf96695888b2840bb9dcafd59f3512b7d1c0b04a76df5150375
MD5 d88d13be1df959422ea38c7fec944b8d
BLAKE2b-256 051a7f93a57e2cec56ae77417d59a7cda03a773d21bc04fd8fe9f7b0b1697b96

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: werx-0.1.2-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.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f333d13d7c1058d8e00ac87d0e0a4019276138303fca0ebf7b6d0a855e0f9441
MD5 839f94b5b71b14698113add2ed9a4913
BLAKE2b-256 31583bd53c1a27f719b8445e9ebaa53c9be568da998506f77aefe4611cbe774d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 688d38ac13dc8a83b89edf90194d79f2eaf87b9079351f44f2ce8ba71639036c
MD5 0096451939d8ebb9bc01d7dcbff306e8
BLAKE2b-256 6dc56d8b2d0a7b33edf85833361b070b145962ea7eb4859f256f4b84da7ce886

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e45553ea7398f27b8d5edb57ec6ef100f17d5e8546ad4cce6e8288e353754126
MD5 cf5fbe00720c34a1d602df00feeeb1ce
BLAKE2b-256 d7b7e52e0eead6fc5d6211eb8a746fe9db267469406e66ccd5c5f4ff959417eb

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: werx-0.1.2-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.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 837a04c51b62128e00bac70fd3b8e803203e823fe70582ed0d7881493b41811c
MD5 b33163639d3ad7e84f6953435dbc20ae
BLAKE2b-256 432740343c4334c15c40811ce5e005375f344137a1801b547c9108722f1aacfa

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e6bd398cba5ebe7c81b67e5249f6237c5d767b14b49d2f417edc17d020fb863e
MD5 edd0def969eaab00e9a3651e9f514e51
BLAKE2b-256 f051983da501f6cb1aaba756bb34a57013d5a242aaa4641c652bf94bd0ba6765

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b84726debcbc92b32e636d90c18481664c0263b26e2b3d2f6695257d7fccb41
MD5 1c37fcc167103f319fc85fa4b917f6e4
BLAKE2b-256 ec3eb0020b1152746d759f229fba7e824a4684c88da79d19c6c9a557cf034ed0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: werx-0.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 134.5 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.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 469c5ab89b313032d1c70b593a076e46b0b491a6c2116a127d18a3bf6b70c8ff
MD5 b315fefec9401d3223a796fe1e678faa
BLAKE2b-256 f46dbff68dea0f0f11505709f555d62d6f70a027c93b584f1bf4938be48d17cc

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e5d974b76db6d735f3a44750863049cdf16c7abfb03194c105d52484488e4b56
MD5 40184b319af26d354fd5df97e28ecb53
BLAKE2b-256 a7660786407f3085291b31ebe10f46b4f5020a3f1ac631b529cee71b29b1682a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for werx-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c2c32f9bd6e4dbed5100882967b653b9e12e24d5e2ce566a8c0c89ef997306df
MD5 2fe95e872d28b4e352cb07feb7c1249c
BLAKE2b-256 4d7d469a4d0c475b362933207b689f004b99ede5a78b3addf7657ee97397db81

See more details on using hashes here.

Provenance

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