Omnibus commited on
Commit
98a2e37
·
verified ·
1 Parent(s): deb32c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ def get_nouns(text):
34
  noun_p=blob_n.noun_phrases
35
  json_object[f'{a}{cont_list[b]}{cont_list[c]}{cont_list[d]}']={'sentence':sen_list[cnt],'nouns':noun_p}
36
  for noun in noun_p:
37
- if noun_list[noun]:
38
  noun_list[noun].append(f'{a}{cont_list[b]}{cont_list[c]}{cont_list[d]}')
39
  else:
40
  noun_list[noun]=[f'{a}{cont_list[b]}{cont_list[c]}{cont_list[d]}']
 
34
  noun_p=blob_n.noun_phrases
35
  json_object[f'{a}{cont_list[b]}{cont_list[c]}{cont_list[d]}']={'sentence':sen_list[cnt],'nouns':noun_p}
36
  for noun in noun_p:
37
+ if noun in list(noun_list.keys()):
38
  noun_list[noun].append(f'{a}{cont_list[b]}{cont_list[c]}{cont_list[d]}')
39
  else:
40
  noun_list[noun]=[f'{a}{cont_list[b]}{cont_list[c]}{cont_list[d]}']