Spaces:
Running
Running
Joshua Lochner
commited on
Commit
·
9f15397
1
Parent(s):
2439d9a
Only consider spoken words when calculating metrics
Browse files- src/evaluate.py +1 -2
src/evaluate.py
CHANGED
@@ -76,8 +76,7 @@ def calculate_metrics(labelled_words, predictions):
|
|
76 |
if index >= len(labelled_words) - 1:
|
77 |
continue
|
78 |
|
79 |
-
|
80 |
-
duration = labelled_words[index+1]['start'] - word['start']
|
81 |
|
82 |
predicted_sponsor = False
|
83 |
for p in predictions:
|
|
|
76 |
if index >= len(labelled_words) - 1:
|
77 |
continue
|
78 |
|
79 |
+
duration = word_end(word) - word_start(word)
|
|
|
80 |
|
81 |
predicted_sponsor = False
|
82 |
for p in predictions:
|