Spaces:
Runtime error
Runtime error
Updating module
Browse files- levenshtein_distance.py +3 -0
levenshtein_distance.py
CHANGED
@@ -120,7 +120,10 @@ class LevenshteinDistance(evaluate.Comparison):
|
|
120 |
dists.append(levenshtein_distance(tokenized_prediction, tokenized_reference, normalize=normalize))
|
121 |
|
122 |
avg_dist = np.mean(dists)
|
|
|
123 |
|
124 |
return {
|
125 |
"levenshtein_distance": avg_dist,
|
|
|
|
|
126 |
}
|
|
|
120 |
dists.append(levenshtein_distance(tokenized_prediction, tokenized_reference, normalize=normalize))
|
121 |
|
122 |
avg_dist = np.mean(dists)
|
123 |
+
std_dist = np.std(dists)
|
124 |
|
125 |
return {
|
126 |
"levenshtein_distance": avg_dist,
|
127 |
+
"distance_std": std_dist,
|
128 |
+
"distances": dists,
|
129 |
}
|