trying
Browse files
app.py
CHANGED
@@ -38,14 +38,16 @@ def ner(text):
|
|
38 |
|
39 |
##Fiscal Sentiment by Sentence
|
40 |
def fin_ext(text):
|
|
|
41 |
doc = nlp(text)
|
42 |
doc_sents = [sent for sent in doc.sents]
|
43 |
sents_list = []
|
44 |
for sent in doc.sents:
|
45 |
sents_list.append(sent.text)
|
46 |
-
results_list=[]
|
47 |
for i in range(len(results)):
|
48 |
results_list.append(results[i]['label'])
|
|
|
49 |
fin_spans = list(zip(sents_list,results_list))
|
50 |
return fin_spans
|
51 |
|
|
|
38 |
|
39 |
##Fiscal Sentiment by Sentence
|
40 |
def fin_ext(text):
|
41 |
+
|
42 |
doc = nlp(text)
|
43 |
doc_sents = [sent for sent in doc.sents]
|
44 |
sents_list = []
|
45 |
for sent in doc.sents:
|
46 |
sents_list.append(sent.text)
|
47 |
+
results_list = []
|
48 |
for i in range(len(results)):
|
49 |
results_list.append(results[i]['label'])
|
50 |
+
fin_spans = []
|
51 |
fin_spans = list(zip(sents_list,results_list))
|
52 |
return fin_spans
|
53 |
|