Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -126,17 +126,17 @@ class Measurer:
|
|
| 126 |
|
| 127 |
def measure(self, l1, l2):
|
| 128 |
if l1 == l2:
|
| 129 |
-
f1 = plot_scalar_on_scale(0.0, "Language Family Tree Distance")
|
| 130 |
-
f2 = plot_scalar_on_scale(0.0, "Distance on the Globe")
|
| 131 |
-
f3 = plot_scalar_on_scale(0.0, "Distance between Phoneme-Sets")
|
| 132 |
-
f4 = plot_scalar_on_scale(0.0, "Learned Distance
|
| 133 |
else:
|
| 134 |
tree_dist, map_dist, asp_dist, learned_dist = self.get_dists(l1.split(" ")[-1].split("(")[1].split(")")[0],
|
| 135 |
l2.split(" ")[-1].split("(")[1].split(")")[0])
|
| 136 |
-
f1 = plot_scalar_on_scale(tree_dist, "Language Family Tree Distance")
|
| 137 |
-
f2 = plot_scalar_on_scale(map_dist, "Distance on the Globe")
|
| 138 |
-
f3 = plot_scalar_on_scale(asp_dist, "Distance between Phoneme-Sets")
|
| 139 |
-
f4 = plot_scalar_on_scale(learned_dist, "Learned Distance
|
| 140 |
|
| 141 |
return f1, f2, f3, f4
|
| 142 |
|
|
|
|
| 126 |
|
| 127 |
def measure(self, l1, l2):
|
| 128 |
if l1 == l2:
|
| 129 |
+
f1 = plot_scalar_on_scale(0.0, f"Language Family Tree Distance between {l1} and {l2}")
|
| 130 |
+
f2 = plot_scalar_on_scale(0.0, f"Distance on the Globe between {l1} and {l2}")
|
| 131 |
+
f3 = plot_scalar_on_scale(0.0, f"Distance between Phoneme-Sets between {l1} and {l2}")
|
| 132 |
+
f4 = plot_scalar_on_scale(0.0, f"Machine-Learned Distance between {l1} and {l2}")
|
| 133 |
else:
|
| 134 |
tree_dist, map_dist, asp_dist, learned_dist = self.get_dists(l1.split(" ")[-1].split("(")[1].split(")")[0],
|
| 135 |
l2.split(" ")[-1].split("(")[1].split(")")[0])
|
| 136 |
+
f1 = plot_scalar_on_scale(tree_dist, f"Language Family Tree Distance between {l1} and {l2}")
|
| 137 |
+
f2 = plot_scalar_on_scale(map_dist, f"Distance on the Globe between {l1} and {l2}")
|
| 138 |
+
f3 = plot_scalar_on_scale(asp_dist, f"Distance between Phoneme-Sets between {l1} and {l2}")
|
| 139 |
+
f4 = plot_scalar_on_scale(learned_dist, f"Machine-Learned Distance between {l1} and {l2}")
|
| 140 |
|
| 141 |
return f1, f2, f3, f4
|
| 142 |
|