change tuple assignment
Browse files- handler.py +5 -1
handler.py
CHANGED
@@ -386,7 +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]] = (0,
|
|
|
|
|
|
|
|
|
390 |
math_word_cloud[math_terms_dict[term]][0] += len(matches)
|
391 |
match_list.append(math_terms_dict[term])
|
392 |
# 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, None)
|
390 |
+
if utt.speaker == uptake_speaker:
|
391 |
+
math_word_cloud[math_terms_dict[term]][1] = 'teacher'
|
392 |
+
else:
|
393 |
+
math_word_cloud[math_terms_dict[term]][1] = 'student'
|
394 |
math_word_cloud[math_terms_dict[term]][0] += len(matches)
|
395 |
match_list.append(math_terms_dict[term])
|
396 |
# Update matched positions
|