Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,12 +17,13 @@ def get_sen_list(text):
|
|
17 |
def proc_sen(sen_list,cnt):
|
18 |
blob_n = TextBlob(sen_list[cnt])
|
19 |
noun_p=blob_n.noun_phrases
|
|
|
20 |
noun_box1=[]
|
21 |
for ea in blob_n.parse().split(" "):
|
22 |
n=ea.split("/")
|
23 |
if n[1] == "NN":
|
24 |
noun_box1.append(n[0])
|
25 |
-
json_object={'sen_num':cnt,'sentence':sen_list[cnt],'noun_phrase':noun_p,'nouns':noun_box1}
|
26 |
return json_object
|
27 |
|
28 |
def proc_nouns(sen_list):
|
|
|
17 |
def proc_sen(sen_list,cnt):
|
18 |
blob_n = TextBlob(sen_list[cnt])
|
19 |
noun_p=blob_n.noun_phrases
|
20 |
+
print(dir(noun_p))
|
21 |
noun_box1=[]
|
22 |
for ea in blob_n.parse().split(" "):
|
23 |
n=ea.split("/")
|
24 |
if n[1] == "NN":
|
25 |
noun_box1.append(n[0])
|
26 |
+
json_object={'sen_num':cnt,'sentence':sen_list[cnt],'noun_phrase':noun_p.list,'nouns':noun_box1}
|
27 |
return json_object
|
28 |
|
29 |
def proc_nouns(sen_list):
|