Skip to content

Commit a7755a1

Browse files
committed
Got rid of test cases (to get code to run quicker)
1 parent 5363196 commit a7755a1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

nlpFiles/getTextFromWeb.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def highRatedSent(paraList):
7878
avgNon = avgPol[1]
7979
for tupIndex in range(len(polarityList)):
8080
if polarityList[tupIndex][0] == "Bias" and polarityList[tupIndex][1] * 100 > avgBias:
81-
highList.append(paraList[tupIndex + 2])
81+
highList.append(paraList[tupIndex + 2] + f" {polarityList[tupIndex][1]}")
8282
return highList
8383
def polarityRating(list, link):
8484
analyzer = SentimentIntensityAnalyzer()
@@ -121,6 +121,3 @@ def polarityRating(list, link):
121121
overallList = [str(round(totBias / count * 100, 1)) + "%", str(round(totNon / count * 100, 1)) + "%", str(round(totPos / polarityCount * 100, 1)) + "%", str(round(totNeg / polarityCount * 100, 1)) + "%"]
122122
if count != 0:
123123
list.insert(0,overallList)
124-
list1 = []
125-
polarityRating(list1, "https://abcnews.go.com/Politics/trump-defendants-post-bond-full-464-million-judgment/story?id=108031376")
126-
print(list1)

0 commit comments

Comments
 (0)