wip
This commit is contained in:
@@ -100,7 +100,7 @@ def main(folder, intervl):
|
||||
toxlevels.append(toxlevel)
|
||||
printnoln("\rcomputing toxic levels: post " + str(len(filteredposts)) + "/" + str(len(filteredposts)) + " ... plotting ...")
|
||||
|
||||
avgsent[option_posts].append(np.mean([s['compound'] for s in toxlevels]))
|
||||
avgsent[option_posts].append(np.mean([s['compound'] for s in toxlevels]) if len(toxlevels) == 0 else 0)
|
||||
avgsentsingle[option_posts].append([s['compound'] for s in toxlevels])
|
||||
|
||||
outfilename = goutfilenamenewusers + "_" + str(option_posts)
|
||||
@@ -186,7 +186,7 @@ def main(folder, intervl):
|
||||
print("Sentiment not found for " + a['Id'])
|
||||
toxlevels.append(toxlevel)
|
||||
printnoln("\rcomputing toxic levels: post " + str(len(filteredposts)) + "/" + str(len(filteredposts)) + " ... plotting ...")
|
||||
avgsent[0].append(np.mean([s['compound'] for s in toxlevels]))
|
||||
avgsent[0].append(np.mean([s['compound'] for s in toxlevels]) if len(toxlevels) == 0 else 0)
|
||||
avgsentsingle[0].append([s['compound'] for s in toxlevels])
|
||||
|
||||
dumptoxlevels(toxlevels, goutfilenameoldusers + ".py")
|
||||
|
||||
Reference in New Issue
Block a user