hylee commited on
Commit
86da978
·
1 Parent(s): 574e721

small nltk fix

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -138,13 +138,13 @@ class Transcript:
138
  teacher_dict = {}
139
  student_dict = {}
140
  uptake_teacher_dict = {}
141
- stopwords = stopwords.words('english')
142
  # stopwords = nltk.corpus.stopwords.word('english')
143
  # print("stopwords: ", stopwords)
144
  for utt in self.utterances:
145
  words = (utt.get_clean_text(remove_punct=True)).split(' ')
146
  for word in words:
147
- if word in stopwords: continue
148
  if utt.role == 'teacher':
149
  if word not in teacher_dict:
150
  teacher_dict[word] = 0
 
138
  teacher_dict = {}
139
  student_dict = {}
140
  uptake_teacher_dict = {}
141
+ stop_words = stopwords.words('english')
142
  # stopwords = nltk.corpus.stopwords.word('english')
143
  # print("stopwords: ", stopwords)
144
  for utt in self.utterances:
145
  words = (utt.get_clean_text(remove_punct=True)).split(' ')
146
  for word in words:
147
+ if word in stop_words: continue
148
  if utt.role == 'teacher':
149
  if word not in teacher_dict:
150
  teacher_dict[word] = 0