Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,15 +28,15 @@ def proc_sen(sen_list,cnt):
|
|
| 28 |
def proc_nouns(sen_list):
|
| 29 |
noun_list={}
|
| 30 |
for nn in list(sen_list.keys()):
|
| 31 |
-
|
| 32 |
-
|
| 33 |
if nnn in list(noun_list.keys()):
|
| 34 |
noun_list[str(nnn)].append(nn)
|
| 35 |
else:
|
| 36 |
noun_list[str(nnn)]=[nn]
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
return noun_list
|
| 41 |
|
| 42 |
def get_nouns(text,steps=1):
|
|
|
|
| 28 |
def proc_nouns(sen_list):
|
| 29 |
noun_list={}
|
| 30 |
for nn in list(sen_list.keys()):
|
| 31 |
+
try:
|
| 32 |
+
for nnn in sen_list[nn]['nouns']:
|
| 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):
|