Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -53,6 +53,15 @@ def get_nouns(text=text,steps=1):
|
|
53 |
blob = TextBlob(text)
|
54 |
for sentence in blob.sentences:
|
55 |
sen_list.append(str(sentence))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
print(sen_list)
|
57 |
key_cnt=len(sen_list)
|
58 |
print(key_cnt)
|
@@ -63,7 +72,7 @@ def get_nouns(text=text,steps=1):
|
|
63 |
for i,ea in enumerate(range(steps)):
|
64 |
|
65 |
if go:
|
66 |
-
for ii,sent in enumerate(
|
67 |
|
68 |
#for iii in
|
69 |
noun_list[f'{control_val[i]}{control_char[ii]}']=sent
|
|
|
53 |
blob = TextBlob(text)
|
54 |
for sentence in blob.sentences:
|
55 |
sen_list.append(str(sentence))
|
56 |
+
|
57 |
+
|
58 |
+
noun_box=[]
|
59 |
+
for ea in blob_n.parse().split(" "):
|
60 |
+
n=ea.split("/")
|
61 |
+
if n[1] == "NN":
|
62 |
+
noun_box.append(n[0])
|
63 |
+
|
64 |
+
|
65 |
print(sen_list)
|
66 |
key_cnt=len(sen_list)
|
67 |
print(key_cnt)
|
|
|
72 |
for i,ea in enumerate(range(steps)):
|
73 |
|
74 |
if go:
|
75 |
+
for ii,sent in enumerate(noun_box):
|
76 |
|
77 |
#for iii in
|
78 |
noun_list[f'{control_val[i]}{control_char[ii]}']=sent
|