Omnibus commited on
Commit
293a651
·
verified ·
1 Parent(s): d08dc84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -29,10 +29,14 @@ def proc_nouns(sen_list):
29
  noun_list={}
30
  for nn in list(sen_list.keys()):
31
  for nnn in sen_list[nn]['nouns']:
32
- if nnn in list(noun_list.keys()):
33
- noun_list[str(nnn)].append(nn)
34
- else:
35
- noun_list[str(nnn)]=[nn]
 
 
 
 
36
  return noun_list
37
 
38
  def get_nouns(text,steps=1):
 
29
  noun_list={}
30
  for nn in list(sen_list.keys()):
31
  for nnn in sen_list[nn]['nouns']:
32
+ try:
33
+ if nnn in list(noun_list.keys()):
34
+ noun_list[str(nnn)].append(nn)
35
+ else:
36
+ noun_list[str(nnn)]=[nn]
37
+ except Exception as e:
38
+ print (e)
39
+ pass
40
  return noun_list
41
 
42
  def get_nouns(text,steps=1):