Skip to content

Commit 65f1943

Browse files
committed
Better visual representation of highly biased sentences: shows percenteage of bias on the left and then the sentence right after
1 parent a7755a1 commit 65f1943

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

db.sqlite3

0 Bytes
Binary file not shown.

nlpFiles/getTextFromWeb.py

+1-1
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] + f" {polarityList[tupIndex][1]}")
81+
highList.append(str(round(polarityList[tupIndex][1] * 100, 1)) + "% Biased: " + paraList[tupIndex + 2] )
8282
return highList
8383
def polarityRating(list, link):
8484
analyzer = SentimentIntensityAnalyzer()

0 commit comments

Comments
 (0)