hylee719 commited on
Commit
dd66c16
·
verified ·
1 Parent(s): 1ab274a

add continue in word clouds if math word is in word

Browse files
Files changed (1) hide show
  1. handler.py +3 -2
handler.py CHANGED
@@ -43,7 +43,6 @@ class Utterance:
43
  self.aggregate_unit_measure = endtime
44
  self.num_math_terms = None
45
  self.math_terms = None
46
- self.math_terms_raw = None
47
 
48
  # moments
49
  self.uptake = None
@@ -159,8 +158,10 @@ class Transcript:
159
  uptake_teacher_dict = {}
160
  stop_words = stopwords.words('english')
161
  for utt in self.utterances:
162
- words = (utt.get_clean_text(remove_punct=True)).split(' ')
163
  for word in words:
 
 
164
  if word in stop_words: continue
165
  if utt.role == 'teacher':
166
  if word not in teacher_dict:
 
43
  self.aggregate_unit_measure = endtime
44
  self.num_math_terms = None
45
  self.math_terms = None
 
46
 
47
  # moments
48
  self.uptake = None
 
158
  uptake_teacher_dict = {}
159
  stop_words = stopwords.words('english')
160
  for utt in self.utterances:
161
+ words = (utt.get_clean_text(remove_punct=True)).split(' ')
162
  for word in words:
163
+ for math_word in utt.math_terms:
164
+ if math_word in word: continue
165
  if word in stop_words: continue
166
  if utt.role == 'teacher':
167
  if word not in teacher_dict: