Spaces:
Running
Running
Ezi Ozoani
commited on
Commit
•
4e0308a
1
Parent(s):
0624c00
pacth try
Browse files- __pycache__/read_extract.cpython-311.pyc +0 -0
- app.py +2 -0
- read_extract.py +7 -0
__pycache__/read_extract.cpython-311.pyc
CHANGED
Binary files a/__pycache__/read_extract.cpython-311.pyc and b/__pycache__/read_extract.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -33,10 +33,12 @@ def check(datatype, task, field, summ=True):
|
|
33 |
st.session_state['summ_thread'].start()
|
34 |
|
35 |
res = read_extract.get_keywords(datatype, task, field, st.session_state['pos_text'], st.session_state['neg_text'])
|
|
|
36 |
|
37 |
st.session_state['p_keywords'], st.session_state['n_keywords'], st.session_state['contrd'], st.session_state['hl_text'] = res
|
38 |
|
39 |
|
|
|
40 |
def display(ph, title, content, highlight=False):
|
41 |
|
42 |
"""
|
|
|
33 |
st.session_state['summ_thread'].start()
|
34 |
|
35 |
res = read_extract.get_keywords(datatype, task, field, st.session_state['pos_text'], st.session_state['neg_text'])
|
36 |
+
|
37 |
|
38 |
st.session_state['p_keywords'], st.session_state['n_keywords'], st.session_state['contrd'], st.session_state['hl_text'] = res
|
39 |
|
40 |
|
41 |
+
|
42 |
def display(ph, title, content, highlight=False):
|
43 |
|
44 |
"""
|
read_extract.py
CHANGED
@@ -224,7 +224,14 @@ def get_keywords(datatype, task, field, pos_text, neg_text):
|
|
224 |
hl_text - the license text formatted to display in a highlighted manner
|
225 |
"""
|
226 |
print('Extracting keywords...')
|
|
|
|
|
227 |
datatype, task, field = datatype.lower(), task.lower(), field.lower()
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
stop_words = set(stopwords.words('english'))
|
230 |
#stops = nltk.corpus.stopwords.words('english')
|
|
|
224 |
hl_text - the license text formatted to display in a highlighted manner
|
225 |
"""
|
226 |
print('Extracting keywords...')
|
227 |
+
|
228 |
+
#[e.lower() for e in list_strings]
|
229 |
datatype, task, field = datatype.lower(), task.lower(), field.lower()
|
230 |
+
#datatype = [e.lower() for e in datatype]
|
231 |
+
#task = [e.lower() for e in task]
|
232 |
+
#field = [e.lower() for e in field]
|
233 |
+
#datatype, task, field = datatype, task, str(field)
|
234 |
+
|
235 |
|
236 |
stop_words = set(stopwords.words('english'))
|
237 |
#stops = nltk.corpus.stopwords.words('english')
|