Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
33 |
-
noun_list
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
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):
|