diff options
| author | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
|---|---|---|
| committer | Patrick Simianer <patrick@lilt.com> | 2026-02-26 10:05:59 +0000 |
| commit | b31ace79ea5f6b3f279c544cd3a443d6fbf2a24d (patch) | |
| tree | 31f2b599fa5f6996aeb134390d58deb63eefe04a /per-sentence-bleu | |
| parent | 8805e95ae94d798c6441f7e1b72c90e049563f17 (diff) | |
Diffstat (limited to 'per-sentence-bleu')
| -rwxr-xr-x | per-sentence-bleu | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/per-sentence-bleu b/per-sentence-bleu index 257eb3a..d815dc9 100755 --- a/per-sentence-bleu +++ b/per-sentence-bleu @@ -1,11 +1,11 @@ #!/usr/bin/env ruby -require 'zipf' -require 'optimist' +require "zipf" +require "optimist" def main conf = Optimist::options do - opt :input, "input", :type => :string, :default => '-' + opt :input, "input", :type => :string, :default => "-" opt :references, "references", :type => :string, :required => true opt :len_hack, "hack of Nakov et al", :type => :int, :default => 0 opt :n, "N", :default => 4 @@ -16,7 +16,7 @@ def main input = ReadFile.new conf[:input] while line = input.gets i += 1 - if line.strip == '' + if line.strip == "" puts 0.0 next end @@ -26,4 +26,3 @@ def main end main - |
