diff options
-rwxr-xr-x | add-seg | 4 | ||||
-rwxr-xr-x | avg | 4 | ||||
-rwxr-xr-x | avg-weights | 4 | ||||
-rwxr-xr-x | bitext-filter-length | 4 | ||||
-rwxr-xr-x | cma | 4 | ||||
-rwxr-xr-x | inv | 4 | ||||
-rwxr-xr-x | kbest-bleu-oracles | 4 | ||||
-rwxr-xr-x | kmeans | 4 | ||||
-rwxr-xr-x | lin-reg | 4 | ||||
-rwxr-xr-x | log-reg | 4 | ||||
-rwxr-xr-x | merge-ttable | 4 | ||||
-rwxr-xr-x | min-max | 4 | ||||
-rwxr-xr-x | ng | 4 |
13 files changed, 26 insertions, 26 deletions
@@ -1,9 +1,9 @@ #!/usr/bin/env ruby -require 'trollop' +require 'optimist' require 'zipf' -o = Trollop::options do +o = Optimist::options do 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' @@ -1,8 +1,8 @@ #!/usr/bin/env ruby -require 'trollop' +require 'optimist' -conf = Trollop::options do +conf = Optimist::options do banner "avg < <one number per line>" opt :round, "Number of digits after decimal point.", :type => :int, :default => -1 end diff --git a/avg-weights b/avg-weights index 36b051a..f090da9 100755 --- a/avg-weights +++ b/avg-weights @@ -1,10 +1,10 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' require 'zlib' -conf = Trollop::options do +conf = Optimist::options do opt :weights_files, "a number of weights files: name value", :required => true opt :filter, "Filter if key does not appear in every file.", :type => :bool, :default => false end diff --git a/bitext-filter-length b/bitext-filter-length index 9e65454..d1dc973 100755 --- a/bitext-filter-length +++ b/bitext-filter-length @@ -1,10 +1,10 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' def main - conf = Trollop::options do + conf = Optimist::options do opt :inputs, "inputs, comma separated", :type => :string, :short => "-i", :required => true opt :output_suffix, "output suffix", :type => :string, :default => ".out", :short => "-S" opt :output_index, "output index", :type => :bool, :default => false, :short => "-J" @@ -1,8 +1,8 @@ #!/usr/bin/env ruby -require 'trollop' +require 'optimist' -conf = Trollop::options do +conf = Optimist::options do banner "cma < <one number per line>" opt :round, "Number of digits after decimal point.", :type => :int, :default => -1 end @@ -1,9 +1,9 @@ #!/usr/bin/env ruby -require 'trollop' +require 'optimist' def main - conf = Trollop::options do + conf = Optimist::options do opt :only_low, "inverse only for values < 1.0", :type => :bool, :default => false, :short => "-l" opt :only_high, "inverse only for values > 1.0", :type => :bool, :default => false, :short => "-h" end diff --git a/kbest-bleu-oracles b/kbest-bleu-oracles index a36c345..ea76ab1 100755 --- a/kbest-bleu-oracles +++ b/kbest-bleu-oracles @@ -1,7 +1,7 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' def get_context kbest_lists, references, n a = [] @@ -12,7 +12,7 @@ def get_context kbest_lists, references, n end def main - conf = Trollop::options do + conf = Optimist::options do opt :kbest_lists, "kbest lists", :type => :string, :required => true opt :references, "reference", :type => :string, :required => true opt :n, "N for BLEU", :type => :int, :default => 4 @@ -1,7 +1,7 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' def read_data fn data = {} @@ -57,7 +57,7 @@ def update assignment, data end def main - conf = Trollop::options do + conf = Optimist::options do opt :k, "k", :type => :int, :required => true opt :input, "input: one feature vector per line", :type => :string, :required => true opt :max_iterations, "max. number of iterations", :type => :int, :default => 100 @@ -1,7 +1,7 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' def read_data fn, scale f = ReadFile.new fn @@ -24,7 +24,7 @@ def read_data fn, scale end def main - conf = Trollop::options do + conf = Optimist::options do opt :input, "input data", :type => :string, :required => true opt :output, "output data", :type => :string, :required => true opt :learning_rate, "learning rate", :type => :float, :default => 0.07 @@ -2,7 +2,7 @@ require 'zipf' require 'matrix' -require 'trollop' +require 'optimist' def read_data fn f = ReadFile.new fn @@ -36,7 +36,7 @@ def approx_eql x, y, eps=10**-10 end def main - conf = Trollop::options do + conf = Optimist::options do opt :input, "input data", :type => :string, :required => true opt :output, "1/0 output data", :type => :string, :required => true end diff --git a/merge-ttable b/merge-ttable index ac10903..77eae9f 100755 --- a/merge-ttable +++ b/merge-ttable @@ -1,10 +1,10 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' def main - conf = Trollop::options do + conf = Optimist::options do opt :f, "f files", :type => :string, :required => true opt :e, "e files", :type => :string, :required => true end @@ -1,9 +1,9 @@ #!/usr/bin/ruby require 'zipf' -require 'trollop' +require 'optimist' -conf = Trollop::options do +conf = Optimist::options do opt :min, "minimum #tokens", :type => :int, :default => 1 opt :max, "maximum #tokens", :type => :int, :default => 80, :short => '-n' opt :in_f, "input 'French' file", :type => :string, :required => true @@ -1,9 +1,9 @@ #!/usr/bin/env ruby require 'zipf' -require 'trollop' +require 'optimist' -conf = Trollop::options do +conf = Optimist::options do banner "ng < <input>" opt :n, "n for Ngrams", :type => :int, :default => 4 opt :fix, "Don't output lower order Ngrams.", :type => :bool, :default => false |