Metadata-Version: 2.4
Name: werx
Version: 0.1.0
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering
Requires-Dist: memory-profiler>=0.61.0
Requires-Dist: maturin>=1.8.3 ; extra == 'dev'
Requires-Dist: pytest>=8.3.5 ; extra == 'dev'
Requires-Dist: mypy>=1.15.0 ; extra == 'dev'
Requires-Dist: ruff>=0.11.8 ; extra == 'dev'
Requires-Dist: werpy ; extra == 'benchmarks'
Requires-Dist: jiwer ; extra == 'benchmarks'
Requires-Dist: pywer ; extra == 'benchmarks'
Requires-Dist: torchmetrics ; extra == 'benchmarks'
Requires-Dist: memory-profiler ; extra == 'benchmarks'
Provides-Extra: dev
Provides-Extra: benchmarks
License-File: LICENSE
License-File: NOTICE
Summary: A high-performance Python package for calculating Word Error Rate (WER), powered by Rust.
Author-email: Ross Armstrong <ross.armstrong@analyticsinmotion.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# 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):
```bash
uv pip install werx
```

### Using pip:
```bash
pip install werx
```

## ✨ Usage
**Import the WERx package**

*Python Code:*
```python
import werx
```

### Examples:

#### 1. Single sentence comparison

*Python Code:*
```python
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:*
```python
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.




