This commit is contained in:
wea_ondara
2020-02-09 11:04:33 +01:00
parent 75dd1064fa
commit 93555d9cbf
4 changed files with 20 additions and 9 deletions

View File

@@ -90,6 +90,8 @@ def main(folder, intervl):
for (i, post) in enumerate(filteredposts):
printnoln("\rcomputing toxic levels: post " + str(i + 1) + "/" + str(len(filteredposts)))
for a in post['Answers']:
if a['CreationDate'] > post['CreationDate'] + timedelta(days=DAYS_NEW_USER):
continue
# if a['Id'] in cachedsentiments.keys():
toxlevel = cachedsentiments[a['Id']]
# else:
@@ -178,6 +180,8 @@ def main(folder, intervl):
for (i, post) in enumerate(filteredposts):
printnoln("\rcomputing toxic levels: post " + str(i + 1) + "/" + str(len(filteredposts)))
for a in post['Answers']:
if a['CreationDate'] > post['CreationDate'] + timedelta(days=DAYS_NEW_USER):
continue
# if a['Id'] in cachedsentiments.keys():
toxlevel = cachedsentiments[a['Id']]
# else: