From 84618d64e3b763415a237cc244e6ad1a787e9cef Mon Sep 17 00:00:00 2001 From: Patrick Simianer Date: Fri, 29 May 2015 09:23:41 +0200 Subject: feature_dict, convert_to_svmlight_format: stderr output --- feature_dict | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'feature_dict') diff --git a/feature_dict b/feature_dict index d0ebb7a..6849769 100755 --- a/feature_dict +++ b/feature_dict @@ -1,10 +1,11 @@ #!/usr/bin/env ruby +not_quiet = ARGV[1] n = 0 feature_dict = {} l_i = 1 while line = STDIN.gets - STDERR.write "#{l_i}\n" + STDERR.write "#{l_i}\n" if l_i%1000==0&¬_quiet line.split.each { |i| f, v = i.split('=', 2) if !feature_dict.has_key? f @@ -15,7 +16,7 @@ while line = STDIN.gets l_i += 1 end -f = File.new "fd.dump", 'w' +f = File.new ARGV[0], 'w' f.write Marshal.dump feature_dict f.close -- cgit v1.2.3