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 /add-seg | |
| parent | 8805e95ae94d798c6441f7e1b72c90e049563f17 (diff) | |
Diffstat (limited to 'add-seg')
| -rwxr-xr-x | add-seg | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -1,12 +1,12 @@ #!/usr/bin/env ruby -require 'optimist' -require 'zipf' +require "optimist" +require "zipf" o = Optimist::options do - opt :grammar, "(Absolute) path of folder containing grammars.", :type => :string, :short => '-g', :default => nil + opt :grammar, "(Absolute) path of folder containing grammars.", :type => :string, :short => "-g", :default => nil opt :loo, "leave one out", :type => :bool, :default => false - opt :start_id, "start with this id", :type => :int, :default => 0, :short => '-i' + opt :start_id, "start with this id", :type => :int, :default => 0, :short => "-i" opt :nogz, "grammar files not gzipped", :type => :bool, :default => false opt :index, "number according to index", :type => :string, :default => nil end @@ -19,8 +19,8 @@ end i = o[:start_id] j = 0 while line = STDIN.gets - ext = '.gz' - ext = '' if o[:nogz] + ext = ".gz" + ext = "" if o[:nogz] s = "<seg" if o[:loo] then s += " exclude=\"#{i}\"" end if index.size > 0 @@ -33,4 +33,3 @@ while line = STDIN.gets i += 1 j += 1 end - |
