星期一, 8月 18, 2014

python一行讀AFINN


dict(map(lambda (w, s): (w, int(s)), [ws.strip().split('\t') for ws in open("AFINN-111.txt")]))