summaryrefslogtreecommitdiff
path: root/convert_to_svmlight_format
diff options
context:
space:
mode:
Diffstat (limited to 'convert_to_svmlight_format')
-rwxr-xr-xconvert_to_svmlight_format3
1 files changed, 2 insertions, 1 deletions
diff --git a/convert_to_svmlight_format b/convert_to_svmlight_format
index 7e5c538..a9ce98f 100755
--- a/convert_to_svmlight_format
+++ b/convert_to_svmlight_format
@@ -5,10 +5,11 @@ require 'zipf'
fd = Marshal.load ReadFile.read ARGV[0]
d = fd.size
+not_quiet = ARGV[1]
train = []
l_i = 1
while line = STDIN.gets
- puts l_i if l_i%1000==0
+ STDERR.write "#{l_i}\n" if l_i%1000==0&&not_quiet
s = []
line.split.each { |i|
k,w = i.split '=', 2