Spaces:
Running
Running
Joshua Lochner
commited on
Commit
·
c0313f5
1
Parent(s):
bb853de
Output raw text during evaluation
Browse files- src/evaluate.py +5 -6
src/evaluate.py
CHANGED
@@ -218,12 +218,11 @@ def main():
|
|
218 |
for sponsor_segment in sponsor_segments:
|
219 |
segment_words = extract_segment(
|
220 |
words, sponsor_segment['start'], sponsor_segment['end'])
|
221 |
-
sponsor_segment['text'] = ' '.join(x['
|
|
|
222 |
|
223 |
-
duration = sponsor_segment['end'] -
|
224 |
-
|
225 |
-
wps = len(segment_words) / \
|
226 |
-
duration if duration > 0 else 0
|
227 |
if wps < 1.5:
|
228 |
continue
|
229 |
|
@@ -232,7 +231,7 @@ def main():
|
|
232 |
if sponsor_segment['locked']:
|
233 |
continue
|
234 |
|
235 |
-
texts.append(sponsor_segment['
|
236 |
segments_to_check.append(sponsor_segment)
|
237 |
|
238 |
if segments_to_check: # Segments to check
|
|
|
218 |
for sponsor_segment in sponsor_segments:
|
219 |
segment_words = extract_segment(
|
220 |
words, sponsor_segment['start'], sponsor_segment['end'])
|
221 |
+
sponsor_segment['text'] = ' '.join(x['text'] for x in segment_words)
|
222 |
+
sponsor_segment['cleaned_text'] = ' '.join(x['cleaned'] for x in segment_words)
|
223 |
|
224 |
+
duration = sponsor_segment['end'] - sponsor_segment['start']
|
225 |
+
wps = (len(segment_words) / duration) if duration > 0 else 0
|
|
|
|
|
226 |
if wps < 1.5:
|
227 |
continue
|
228 |
|
|
|
231 |
if sponsor_segment['locked']:
|
232 |
continue
|
233 |
|
234 |
+
texts.append(sponsor_segment['cleaned_text'])
|
235 |
segments_to_check.append(sponsor_segment)
|
236 |
|
237 |
if segments_to_check: # Segments to check
|