Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -386,11 +386,11 @@ def run_math_density(transcript, uptake_speaker=None):
|
|
386 |
matches = [match for match in matches if not any(match.start() in range(existing[0], existing[1]) for existing in matched_positions)]
|
387 |
if len(matches) > 0:
|
388 |
if math_terms_dict[term] not in math_word_cloud:
|
389 |
-
math_word_cloud[math_terms_dict[term]] =
|
390 |
if utt.speaker == uptake_speaker:
|
391 |
-
math_word_cloud[math_terms_dict[term]]
|
392 |
else:
|
393 |
-
math_word_cloud[math_terms_dict[term]]
|
394 |
math_word_cloud[math_terms_dict[term]][0] += len(matches)
|
395 |
match_list.append(math_terms_dict[term])
|
396 |
# Update matched positions
|
|
|
386 |
matches = [match for match in matches if not any(match.start() in range(existing[0], existing[1]) for existing in matched_positions)]
|
387 |
if len(matches) > 0:
|
388 |
if math_terms_dict[term] not in math_word_cloud:
|
389 |
+
math_word_cloud[math_terms_dict[term]] = [0]
|
390 |
if utt.speaker == uptake_speaker:
|
391 |
+
math_word_cloud[math_terms_dict[term]].append('teacher')
|
392 |
else:
|
393 |
+
math_word_cloud[math_terms_dict[term]].append('student')
|
394 |
math_word_cloud[math_terms_dict[term]][0] += len(matches)
|
395 |
match_list.append(math_terms_dict[term])
|
396 |
# Update matched positions
|