test print matches
Browse files- handler.py +2 -1
handler.py
CHANGED
@@ -392,7 +392,8 @@ def run_math_density(transcript):
|
|
392 |
matches = list(re.finditer(term, text, re.IGNORECASE))
|
393 |
# Filter out matches that share positions with longer terms
|
394 |
matches = [match for match in matches if not any(match.start() in range(existing[0], existing[1]) for existing in matched_positions)]
|
395 |
-
|
|
|
396 |
if len(matches) > 0:
|
397 |
if utt.role == "teacher":
|
398 |
if math_terms_dict[term] not in teacher_math_word_cloud:
|
|
|
392 |
matches = list(re.finditer(term, text, re.IGNORECASE))
|
393 |
# Filter out matches that share positions with longer terms
|
394 |
matches = [match for match in matches if not any(match.start() in range(existing[0], existing[1]) for existing in matched_positions)]
|
395 |
+
matched_text = [match.group(0) for match in matches]
|
396 |
+
print("matches: ", matched_text)
|
397 |
if len(matches) > 0:
|
398 |
if utt.role == "teacher":
|
399 |
if math_terms_dict[term] not in teacher_math_word_cloud:
|