All pastes #15096 Raw Edit

Miscellany

public text v1 · immutable
#15096 ·published 2005-06-20 17:09 UTC
rendered paste body
file=ARGV[0]
info = Hash.new {|h,k,l,m| h[k][l][m] = 0.0 }

File.open(file) do |f|
        while f.gets
                _, qn, docid, rank, score, _ = split(/\s+/)
                #info[qn+'_'+docid+'_'+'score'] += score.to_f
                info[qn][docid]['score'] += score.to_f
        end
end

p info