diff options
author | Patrick Simianer <p@simianer.de> | 2016-07-05 11:01:46 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-07-05 11:01:46 +0200 |
commit | 2b1d7f881c19c4d4b5afae194e02d3300c7675d0 (patch) | |
tree | 5a06ee7de98640a39244b57bb369697176b44ebf /per_sentence_bleu_kbest | |
parent | 69949dda35c3ea21d8e926e5f0a596a0a0f61c6a (diff) |
mv
Diffstat (limited to 'per_sentence_bleu_kbest')
-rwxr-xr-x | per_sentence_bleu_kbest | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/per_sentence_bleu_kbest b/per_sentence_bleu_kbest deleted file mode 100755 index f8bd860..0000000 --- a/per_sentence_bleu_kbest +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env ruby - -require 'zipf' -require 'trollop' - -def main - conf = Trollop::options do - opt :kbests, "kbests", :type => :string, :default => '-' - opt :references, "references", :type => :string, :required => true - end - refs = ReadFile.new conf[:references] - kbest_lists = read_kbest_lists conf[:kbests] - i = 0 - kbest_lists.each { |list| - scores = [] - o = false - list.each { |e| scores << per_sentence_bleu(e, refs[i]) } - max = scores.max - scores.each_with_index { |x,j| - puts "#{j+1} ||| #{scores[j]} ||| #{list[j]}" - if scores[j]==max && !o - puts "^^^ #{j+1} #{max}" - o = true - end - } - puts - i += 1 - } -end - -main - |