RobPruzan commited on
Commit
3c63f84
1 Parent(s): c68add4

Updating func name

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,7 +45,7 @@ model.to('cpu')
45
  p = pipeline("automatic-speech-recognition")
46
 
47
 
48
- def syns(word):
49
  synonyms = []
50
  for syn in wn.synsets(word):
51
  for lm in syn.lemmas():
@@ -85,7 +85,7 @@ def calculate_diversity(text):
85
  if not comp.isalpha():
86
  continue
87
  try:
88
- if cosine_similarity(w2v[anc].reshape(1, -1), w2v[comp].reshape(1, -1)) > .7 or comp in syns(anc):
89
  vocab.append(comp)
90
  except KeyError:
91
  continue
 
45
  p = pipeline("automatic-speech-recognition")
46
 
47
 
48
+ def wn_syns(word):
49
  synonyms = []
50
  for syn in wn.synsets(word):
51
  for lm in syn.lemmas():
 
85
  if not comp.isalpha():
86
  continue
87
  try:
88
+ if cosine_similarity(w2v[anc].reshape(1, -1), w2v[comp].reshape(1, -1)) > .7 or comp in wn_syns(anc):
89
  vocab.append(comp)
90
  except KeyError:
91
  continue