Update app.py
Browse files
app.py
CHANGED
@@ -91,12 +91,14 @@ if (st.checkbox('الاستعانة بالرسم البياني المعرفي
|
|
91 |
return tmt
|
92 |
tmt = compute_score(L, id_list)
|
93 |
exp_terms = []
|
|
|
|
|
|
|
94 |
t_li = tmt.values()
|
95 |
tmexp = sorted(tmt.items(), key=lambda x: x[1], reverse=True)
|
96 |
i = 0
|
97 |
dict_res = {'الكلمة المقترحة':[],
|
98 |
'العلامة':[]}
|
99 |
-
|
100 |
for key, value in tmexp:
|
101 |
new_score=((value-min(t_li))/(max(t_li)-min(t_li)))-0.0001
|
102 |
dict_res['العلامة'].append(str(new_score)[:6])
|
|
|
91 |
return tmt
|
92 |
tmt = compute_score(L, id_list)
|
93 |
exp_terms = []
|
94 |
+
for e in sent:
|
95 |
+
if (e in tmt):
|
96 |
+
del tmt[e]
|
97 |
t_li = tmt.values()
|
98 |
tmexp = sorted(tmt.items(), key=lambda x: x[1], reverse=True)
|
99 |
i = 0
|
100 |
dict_res = {'الكلمة المقترحة':[],
|
101 |
'العلامة':[]}
|
|
|
102 |
for key, value in tmexp:
|
103 |
new_score=((value-min(t_li))/(max(t_li)-min(t_li)))-0.0001
|
104 |
dict_res['العلامة'].append(str(new_score)[:6])
|