Spaces:
Sleeping
Sleeping
Spell the thing right
Browse files- phone_distance.py +2 -2
- requirements.txt +1 -1
phone_distance.py
CHANGED
@@ -18,7 +18,7 @@ This is basically a Hugging Face wrapper around the panphone library's distance
|
|
18 |
import evaluate
|
19 |
import datasets
|
20 |
import numpy as np
|
21 |
-
import
|
22 |
|
23 |
|
24 |
_CITATION = """\
|
@@ -100,7 +100,7 @@ class PhoneDistance(evaluate.Metric):
|
|
100 |
Returns:
|
101 |
_type_: _description_
|
102 |
"""
|
103 |
-
distance_computer =
|
104 |
phoneme_error_rates = []
|
105 |
feature_error_rates = []
|
106 |
hamming_distances = []
|
|
|
18 |
import evaluate
|
19 |
import datasets
|
20 |
import numpy as np
|
21 |
+
import panphon.distance
|
22 |
|
23 |
|
24 |
_CITATION = """\
|
|
|
100 |
Returns:
|
101 |
_type_: _description_
|
102 |
"""
|
103 |
+
distance_computer = panphon.distance.Distance(feature_set=feature_set, feature_model=feature_model)
|
104 |
phoneme_error_rates = []
|
105 |
feature_error_rates = []
|
106 |
hamming_distances = []
|
requirements.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
git+https://github.com/huggingface/evaluate@
|
2 |
panphon==0.20.0
|
|
|
1 |
+
git+https://github.com/huggingface/evaluate@main
|
2 |
panphon==0.20.0
|