hylee719 commited on
Commit
3d29d3d
·
1 Parent(s): d51c12a

Update handler.py

Browse files
Files changed (1) hide show
  1. 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]] = (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
 
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