Open-lattice Indic Word Error Rate (OIWER) with a fast Rust core
Project description
voi_oiwer
Open-lattice Indic Word Error Rate (OIWER) for ASR evaluation across Indian languages, with a fast Rust core.
Unlike plain WER, OIWER scores a hypothesis against a lattice of accepted reference variations per word/phrase, so legitimate spelling / transliteration variants aren't counted as errors.
Install
pip install voi_oiwer
Works on CPython 3.8+ (Linux, macOS, Windows). Prebuilt wheels — no Rust toolchain needed.
Usage
from voi_oiwer import oiwer
score, final_h, final_r, final_ops, (ins, dele, sub), \
total_ref_words, metadata, std_refs = oiwer(
hypothesis="नमस्ते दुनिया",
reference_lists=[["नमस्ते"], ["दुनिया", "विश्व"]], # lattice: variations per slot
input_language="hindi",
)
print(score) # OIWER, as a percentage
Arguments
| arg | type | description |
|---|---|---|
hypothesis |
str |
the ASR output text |
reference_lists |
list[list[str]] |
the reference lattice — one list of accepted variations per slot (a variation may be multiple words) |
input_language |
str |
a language name, e.g. "hindi", "tamil", "urdu" (see list below) |
Returns
A tuple:
(oiwer_score, # float — error percentage
final_h, # list[str] — aligned hypothesis words
final_r, # list[str] — aligned reference words (" " = insertion)
final_ops, # list[str] — per slot: 'c' correct, 's' sub, 'd' del, 'i' ins
(insertions, deletions, substitutions),
total_reference_words, # int
final_metadata, # list — [lat_idx, var_idx, word_idx] per reference word (None for insertions)
standardized_reference_lists) # list[list[str]] — the normalized lattice used internally
Supported languages
assamese, bengali, bodo, dogri, gujarati, hindi, kannada,
kashmiri, konkani, maithili, malayalam, manipuri, marathi,
nepali, odia, punjabi, sanskrit, santali, sindhi, tamil,
telugu, urdu, chattisgarhi, bhojpuri.
How it works
Text normalization (indicnlp-based) runs in Python; the edit-distance alignment over the lattice runs in a compiled Rust core — so results are identical to the reference implementation while running several times faster.
Development
pip install maturin
maturin develop --release # build the Rust core into your active venv
pytest -q # run the test suite
License
MIT © JoshTalks
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file voi_oiwer-0.1.0.tar.gz.
File metadata
- Download URL: voi_oiwer-0.1.0.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
189b08a5a9470043fe3be77a9afa86505284bb28fbdd79e8149c514afe932752
|
|
| MD5 |
7c707eaed73d9fa65beed89a47fcf3d1
|
|
| BLAKE2b-256 |
5b41e0b77ae602fd39d39c0fc4951c01e8e48a31547f7c6d08439e22ba407b25
|
Provenance
The following attestation bundles were made for voi_oiwer-0.1.0.tar.gz:
Publisher:
release.yml on JoshTalks/voi_oiwer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voi_oiwer-0.1.0.tar.gz -
Subject digest:
189b08a5a9470043fe3be77a9afa86505284bb28fbdd79e8149c514afe932752 - Sigstore transparency entry: 2130319551
- Sigstore integration time:
-
Permalink:
JoshTalks/voi_oiwer@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JoshTalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Trigger Event:
push
-
Statement type:
File details
Details for the file voi_oiwer-0.1.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: voi_oiwer-0.1.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 112.8 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2d472b00d11fc74037734c1013fb8f4b99aae0d3e37fca699041eb12b600629
|
|
| MD5 |
f49b02520d67aaf627c72da2f41f23ed
|
|
| BLAKE2b-256 |
9b5402c8cce12915b39fb6f8f7ded6eb5f72264ac9a58c9cd86abc2dcc84d207
|
Provenance
The following attestation bundles were made for voi_oiwer-0.1.0-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on JoshTalks/voi_oiwer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voi_oiwer-0.1.0-cp38-abi3-win_amd64.whl -
Subject digest:
b2d472b00d11fc74037734c1013fb8f4b99aae0d3e37fca699041eb12b600629 - Sigstore transparency entry: 2130319704
- Sigstore integration time:
-
Permalink:
JoshTalks/voi_oiwer@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JoshTalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Trigger Event:
push
-
Statement type:
File details
Details for the file voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 222.9 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
659836e933fda11fa5fa40c4fbf30133a824d65ee8ea74f80ed37fcffa6945af
|
|
| MD5 |
83be9552e05f1765cb67314d87cbe32c
|
|
| BLAKE2b-256 |
4359db9f052cd8e07d36da71a4563cbe9064aca535a03d4f1b4c4fdedea0b42a
|
Provenance
The following attestation bundles were made for voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on JoshTalks/voi_oiwer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
659836e933fda11fa5fa40c4fbf30133a824d65ee8ea74f80ed37fcffa6945af - Sigstore transparency entry: 2130319877
- Sigstore integration time:
-
Permalink:
JoshTalks/voi_oiwer@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JoshTalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Trigger Event:
push
-
Statement type:
File details
Details for the file voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 219.7 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf620b3d0c9033fc6e12fd40fef51611f391b4f7616ebd8b33a65ceeaf3d8001
|
|
| MD5 |
f002efc524694450f4cadba92052ff2f
|
|
| BLAKE2b-256 |
202469dff07269e91446db17acce69eec693bcebcdb4abe09c091a67afce7912
|
Provenance
The following attestation bundles were made for voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on JoshTalks/voi_oiwer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voi_oiwer-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
cf620b3d0c9033fc6e12fd40fef51611f391b4f7616ebd8b33a65ceeaf3d8001 - Sigstore transparency entry: 2130320119
- Sigstore integration time:
-
Permalink:
JoshTalks/voi_oiwer@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JoshTalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Trigger Event:
push
-
Statement type:
File details
Details for the file voi_oiwer-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: voi_oiwer-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 206.7 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbdd9e9dd9ece7f81cd5d6853fa3736fdd0777127d9960fa9ef466c597b742ce
|
|
| MD5 |
065d3a6bff0ef3fd29307135289b6b88
|
|
| BLAKE2b-256 |
7da1222cec5f1d6855b71a21dbe66dd62bdeafe586447862d18e17ffa5efaa61
|
Provenance
The following attestation bundles were made for voi_oiwer-0.1.0-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on JoshTalks/voi_oiwer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voi_oiwer-0.1.0-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
dbdd9e9dd9ece7f81cd5d6853fa3736fdd0777127d9960fa9ef466c597b742ce - Sigstore transparency entry: 2130320565
- Sigstore integration time:
-
Permalink:
JoshTalks/voi_oiwer@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JoshTalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Trigger Event:
push
-
Statement type:
File details
Details for the file voi_oiwer-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: voi_oiwer-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 213.5 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a8b11127c9e49ccdedc4dadf37bd22a0363366637b7d23f195c539ef995687e
|
|
| MD5 |
d82060a7404b4670082210aedf7ab98f
|
|
| BLAKE2b-256 |
52dd6a75bcf5f59f661f457380299ff1f433aadcd0aaa6e47a956365ad455d67
|
Provenance
The following attestation bundles were made for voi_oiwer-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on JoshTalks/voi_oiwer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
voi_oiwer-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl -
Subject digest:
7a8b11127c9e49ccdedc4dadf37bd22a0363366637b7d23f195c539ef995687e - Sigstore transparency entry: 2130320270
- Sigstore integration time:
-
Permalink:
JoshTalks/voi_oiwer@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JoshTalks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2538f6fca9888fdca5b9833d9f04719503fe572 -
Trigger Event:
push
-
Statement type: