Spaces:
Sleeping
Sleeping
Downgrade gradio version to fix table display for examples
Browse filesFiles changed (2)
- README.md+16-16
- requirements.txt+1-1
8 unmodified lines91011121314151 unmodified line17181920212223246 unmodified lines313233343536371 unmodified line3940414243444546472 unmodified lines5051525354555657585960616263646566676869707172737475768 unmodified lines8586878889909113 unmodified lines1051061071081091108 unmodified linesAlphabet (IPA) in a linguistically motivated way. This is useful whenevaluating speech recognition or orthographic to IPA conversion tasks.sdk: gradiosdk_version: 3.50.2app_file: app.pypinned: false---1 unmodified line# Metric Card for Phone Errors## Metric DescriptionError rates in terms of distance between articulatory phonological features can help understand differences between strings in the International Phonetic Alphabet (IPA) in a linguistically motivated way.This is useful when evaluating speech recognition or orthographic to IPA conversion tasks. These are Levenshtein distances for comparing strings where the smallest unit of measurement is based on phones or articulatory phonological features, rather than Unicode characters.## How to Use6 unmodified lines### Inputs- **predictions** (`list` of `str`): Transcriptions to score.- **references** (`list` of `str`) : Reference strings serving as ground truth.- **feature_model** (`str`): Set which panphon.distance.Distance feature parsing model is used, choose from `"strict"`, `"permissive"`, `"segment"`. Defaults to `"segment"`.- **is_normalize_pfer** (`bool`): Set to `True `to normalize PFER by the largest number of phones in the prediction, reference pair. Defaults to `False`. When this is used PFER will no longer obey the triangle inequality.1 unmodified lineThe computation returns a dictionary with the following key and values:- **phone_error_rates** (`list` of `float`): Phone error rate (PER) gives edit distance in terms of phones for each prediction-reference pair, rather than Unicode characters, since phones can consist of multiple characters. It is normalized by the number of phones of the reference string. The result with have the same length as the input prediction and reference lists.- **mean_phone_error_rate** (`float`): Overall mean of PER.- **phone_feature_error_rates** (`list` of `float`): Phone feature error rate (PFER) is Levenshtein distance between strings where distance between individual phones is computed using Hamming distance between phonetic features for each prediction-reference pair. By default it is a metric that obeys the triangle equality, but can also be normalized by number of phones.- **mean_phone_feature_error_rate** (`float`): Overall mean of PFER.- **feature_error_rates** (`list` of `float`): Feature error rate (FER) is the edit distance in terms of articulatory features normalized by the number of phones in the reference, computed for each prediction-reference pair.- **mean_feature_error_rate** (`float`): Overall mean of FER.2 unmodified lines### ExamplesSimplest use case to compute phone error rates between two IPA strings:```python>>> phone_errors.compute(predictions=["bob", "ði", "spin"], references=["pop", "ðə", "spʰin"]){'phone_error_rates': [0.6666666666666666, 0.5, 0.25], 'mean_phone_error_rate': 0.47222222222222215,'phone_feature_error_rates': [0.08333333333333333, 0.125, 0.041666666666666664], 'mean_phone_feature_error_rate': 0.08333333333333333,'feature_error_rates': [0.027777777777777776, 0.0625, 0.30208333333333337], 'mean_feature_error_rate': 0.13078703703703706}```Normalize phone feature error rate by the length of the reference string:```python>>> phone_errors.compute(predictions=["bob", "ði"], references=["pop", "ðə"], is_normalize_pfer=True){'phone_error_rates': [0.6666666666666666, 0.5], 'mean_phone_error_rate': 0.5833333333333333,'phone_feature_error_rates': [0.027777777777777776, 0.0625], 'mean_phone_feature_error_rate': 0.04513888888888889,'feature_error_rates': [0.027777777777777776, 0.0625], 'mean_feature_error_rate': 0.04513888888888889}```Error rates may be greater than 1.0 if the reference string is shorter than the prediction string:```python>>> phone_errors.compute(predictions=["bob"], references=["po"]){'phone_error_rates': [1.0], 'mean_phone_error_rate': 1.0,'phone_feature_error_rates': [1.0416666666666667], 'mean_phone_feature_error_rate': 1.0416666666666667,'feature_error_rates': [0.020833333333333332], 'mean_feature_error_rate': 0.020833333333333332}```8 unmodified lines## Limitations and Bias- Phone error rate and feature error rate can be greater than 1.0 if the reference string is shorter than the prediction string.- Since these are error rates, not edit distances, the reference strings cannot be empty.## Citation```bibtex13 unmodified lines```## Further References- PER and PFER are used as evaluation metrics in [Universal Automatic Phonetic Transcription into the International Phonetic Alphabet (Taguchi et al.)](https://www.isca-archive.org/interspeech_2023/taguchi23_interspeech.html)- Pierce Darragh's blog post [Introduction to Phonology, Part 3: Phonetic Features](https://pdarragh.github.io/blog/2018/04/26/intro-to-phonology-pt-3/) gives an overview of phonetic features for speech sounds.- [panphon Github repository](https://github.com/dmort27/panphon)8 unmodified lines91011121314151 unmodified line17181920212223246 unmodified lines313233343536371 unmodified line3940414243444546472 unmodified lines5051525354555657585960616263646566676869707172737475768 unmodified lines8586878889909113 unmodified lines1051061071081091108 unmodified linesAlphabet (IPA) in a linguistically motivated way. This is useful whenevaluating speech recognition or orthographic to IPA conversion tasks.sdk: gradiosdk_version: 3.19.1app_file: app.pypinned: false---1 unmodified line# Metric Card for Phone Errors## Metric DescriptionError rates in terms of distance between articulatory phonological features can help understand differences between strings in the International Phonetic Alphabet (IPA) in a linguistically motivated way.This is useful when evaluating speech recognition or orthographic to IPA conversion tasks. These are Levenshtein distances for comparing strings where the smallest unit of measurement is based on phones or articulatory phonological features, rather than Unicode characters.## How to Use6 unmodified lines### Inputs- **predictions** (`list` of `str`): Transcriptions to score.- **references** (`list` of `str`) : Reference strings serving as ground truth.- **feature_model** (`str`): Set which panphon.distance.Distance feature parsing model is used, choose from `"strict"`, `"permissive"`, `"segment"`. Defaults to `"segment"`.- **is_normalize_pfer** (`bool`): Set to `True `to normalize PFER by the largest number of phones in the prediction, reference pair. Defaults to `False`. When this is used PFER will no longer obey the triangle inequality.1 unmodified lineThe computation returns a dictionary with the following key and values:- **phone_error_rates** (`list` of `float`): Phone error rate (PER) gives edit distance in terms of phones for each prediction-reference pair, rather than Unicode characters, since phones can consist of multiple characters. It is normalized by the number of phones of the reference string. The result with have the same length as the input prediction and reference lists.- **mean_phone_error_rate** (`float`): Overall mean of PER.- **phone_feature_error_rates** (`list` of `float`): Phone feature error rate (PFER) is Levenshtein distance between strings where distance between individual phones is computed using Hamming distance between phonetic features for each prediction-reference pair. By default it is a metric that obeys the triangle equality, but can also be normalized by number of phones.- **mean_phone_feature_error_rate** (`float`): Overall mean of PFER.- **feature_error_rates** (`list` of `float`): Feature error rate (FER) is the edit distance in terms of articulatory features normalized by the number of phones in the reference, computed for each prediction-reference pair.- **mean_feature_error_rate** (`float`): Overall mean of FER.2 unmodified lines### ExamplesSimplest use case to compute phone error rates between two IPA strings:```python>>> phone_errors.compute(predictions=["bob", "ði", "spin"], references=["pop", "ðə", "spʰin"]){'phone_error_rates': [0.6666666666666666, 0.5, 0.25], 'mean_phone_error_rate': 0.47222222222222215,'phone_feature_error_rates': [0.08333333333333333, 0.125, 0.041666666666666664], 'mean_phone_feature_error_rate': 0.08333333333333333,'feature_error_rates': [0.027777777777777776, 0.0625, 0.30208333333333337], 'mean_feature_error_rate': 0.13078703703703706}```Normalize phone feature error rate by the length of the reference string:```python>>> phone_errors.compute(predictions=["bob", "ði"], references=["pop", "ðə"], is_normalize_pfer=True){'phone_error_rates': [0.6666666666666666, 0.5], 'mean_phone_error_rate': 0.5833333333333333,'phone_feature_error_rates': [0.027777777777777776, 0.0625], 'mean_phone_feature_error_rate': 0.04513888888888889,'feature_error_rates': [0.027777777777777776, 0.0625], 'mean_feature_error_rate': 0.04513888888888889}```Error rates may be greater than 1.0 if the reference string is shorter than the prediction string:```python>>> phone_errors.compute(predictions=["bob"], references=["po"]){'phone_error_rates': [1.0], 'mean_phone_error_rate': 1.0,'phone_feature_error_rates': [1.0416666666666667], 'mean_phone_feature_error_rate': 1.0416666666666667,'feature_error_rates': [0.020833333333333332], 'mean_feature_error_rate': 0.020833333333333332}```8 unmodified lines## Limitations and Bias- Phone error rate and feature error rate can be greater than 1.0 if the reference string is shorter than the prediction string.- Since these are error rates, not edit distances, the reference strings cannot be empty.## Citation```bibtex13 unmodified lines```## Further References- PER and PFER are used as evaluation metrics in [Universal Automatic Phonetic Transcription into the International Phonetic Alphabet (Taguchi et al.)](https://www.isca-archive.org/interspeech_2023/taguchi23_interspeech.html)- Pierce Darragh's blog post [Introduction to Phonology, Part 3: Phonetic Features](https://pdarragh.github.io/blog/2018/04/26/intro-to-phonology-pt-3/) gives an overview of phonetic features for speech sounds.- [panphon Github repository](https://github.com/dmort27/panphon)
12evaluate==0.4.3git+https://github.com/dmort27/panphon.git12evaluategit+https://github.com/dmort27/panphon.git
README.md+16-16
requirements.txt+1-1