Metadata-Version: 2.4
Name: airwer
Version: 0.2.0
Summary: Word Error Rate for Air Traffic Control
Project-URL: Repository, https://github.com/twangodev/airwer
Project-URL: Issues, https://github.com/twangodev/airwer/issues
Author-email: James Ding <james@twango.dev>
License: Apache-2.0
License-File: LICENSE
Keywords: air-traffic-control,asr,atc,jiwer,normalization,speech-recognition,wer
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: jiwer<5,>=4.0
Description-Content-Type: text/markdown

# airwer

Word Error Rate for Air Traffic Control.

## Install

```bash
pip install airwer
```

## Usage

```python
import airwer

airwer.wer("descend flight level two five zero", "descend FL250")  # 0.0
airwer.wer("turn heading two one zero", "turn heading 220")        # > 0.0
```

## API

Each takes a single utterance (`str`) or a corpus (`Sequence[str]`), plus an
optional `WerConfig` to override the default `CANONICAL` profile.

| Function | What it scores |
| --- | --- |
| `wer(ref, hyp)` | Corpus Word Error Rate (the default metric) |
| `cer(ref, hyp)` | Character Error Rate |
| `numeric_wer(ref, hyp)` | WER over numbers only - safety-critical digits |
| `agreement(a, b)` | Symmetric `[0, 1]` overlap of two transcripts (`1` = identical), for model-vs-model voting |
| `ladder(ref, hyp)` | WER at each normalization rung, `raw` to `semantic` |
| `process(ref, hyp)` | Full `WerResult` - every metric plus per-utterance and distribution stats |

`normalize(text)` exposes the normalization step on its own. `WerConfig`, the
`profiles` presets, and the `vocab` term lists let you tune phraseology
handling.
