Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,6 +51,24 @@ def proc_nouns(sen_list):
|
|
51 |
def sort_doc(text,steps_in=0,control=None):
|
52 |
text=str(text)
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
if not steps_in:
|
55 |
|
56 |
control_char=list(control_json['control'])
|
@@ -77,35 +95,18 @@ def sort_doc(text,steps_in=0,control=None):
|
|
77 |
control_val=list(control_json['control'][control_len:])
|
78 |
val_len=len(control_val)
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
json_out={}
|
84 |
noun_list={}
|
85 |
step_list=[]
|
86 |
-
step_cont_box=[]
|
87 |
-
########################################
|
88 |
-
sen_list=get_sen_list(text)
|
89 |
-
key_cnt=len(sen_list)
|
90 |
-
|
91 |
-
sen_obj_box=[]
|
92 |
-
for ii,ee in enumerate(sen_list):
|
93 |
-
sen_obj=proc_sen(sen_list,ii)
|
94 |
-
sen_obj_box.append(sen_obj)
|
95 |
-
|
96 |
-
sen_list=sen_obj_box
|
97 |
-
######################################
|
98 |
-
key_cnt=len(sen_obj_box)
|
99 |
-
print(key_cnt)
|
100 |
-
#noun_cnt=len(noun_box)
|
101 |
-
#print(noun_cnt)
|
102 |
|
103 |
big_cnt=0
|
104 |
cnt=0
|
105 |
go=True
|
106 |
|
107 |
|
108 |
-
|
109 |
for ii in range(steps):
|
110 |
print(ii)
|
111 |
step_cont_box.append(0)
|
|
|
51 |
def sort_doc(text,steps_in=0,control=None):
|
52 |
text=str(text)
|
53 |
|
54 |
+
########################################
|
55 |
+
sen_list=get_sen_list(text)
|
56 |
+
key_cnt=len(sen_list)
|
57 |
+
|
58 |
+
sen_obj_box=[]
|
59 |
+
for ii,ee in enumerate(sen_list):
|
60 |
+
sen_obj=proc_sen(sen_list,ii)
|
61 |
+
sen_obj_box.append(sen_obj)
|
62 |
+
|
63 |
+
sen_list=sen_obj_box
|
64 |
+
######################################
|
65 |
+
key_cnt=len(sen_obj_box)
|
66 |
+
print(key_cnt)
|
67 |
+
#noun_cnt=len(noun_box)
|
68 |
+
#print(noun_cnt)
|
69 |
+
|
70 |
+
|
71 |
+
|
72 |
if not steps_in:
|
73 |
|
74 |
control_char=list(control_json['control'])
|
|
|
95 |
control_val=list(control_json['control'][control_len:])
|
96 |
val_len=len(control_val)
|
97 |
|
98 |
+
|
99 |
+
|
|
|
100 |
json_out={}
|
101 |
noun_list={}
|
102 |
step_list=[]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
big_cnt=0
|
105 |
cnt=0
|
106 |
go=True
|
107 |
|
108 |
|
109 |
+
step_cont_box=[]
|
110 |
for ii in range(steps):
|
111 |
print(ii)
|
112 |
step_cont_box.append(0)
|