def read_turk_dic_proton():
"""
dic of abs_id to answers to (wid, q3,q4) for each worker
"""
f = open("data/proton-beam-RawTurkResults.csv")
first_line = f.readline()
csv_reader = csv.reader(f)
turk_dic = {}
for row in csv_reader:
(AssignmentId, WorkerId, HITId, AcceptTime, SubmitTime, ApprovalTime, TimeToComplete, AbstractId, Question1, Question2, Question3, Question4, Relevant) = tuple(row)
AbstractId = int(AbstractId)
if AbstractId not in turk_dic: turk_dic[AbstractId] = []
turk_dic[AbstractId].append( (Question3, Question4) )
return turk_dic
评论列表
文章目录