This commit is contained in:
wea_ondara
2020-01-28 11:33:50 +01:00
parent c2695e0d49
commit 03c86683fb
7 changed files with 47 additions and 23 deletions

View File

@@ -101,7 +101,7 @@ def readtoxleveltxt(filename):
ra = line.split(";")
ra = [l.split(":") for l in ra]
# print("i1: " + str(ra[0:5]))
ra = {id: {"neg": float(neg), "neu": float(neu), "pos": float(pos), "compound": float(compound)} for [id, neg, neu, pos, compound] in ra}
ra = {int(id): {"neg": float(neg), "neu": float(neu), "pos": float(pos), "compound": float(compound)} for [id, neg, neu, pos, compound] in ra}
# print("i1: " + str(ra)[0:500])
return rq, ra