From 5339c8fdb1df47a2dab688bf1469e02a28eb0c89 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Fri, 4 Nov 2016 17:04:12 +0100
Subject: rename, remove non nlp stuff
---
convert-to-svm-light-format | 22 ----------------------
dense-features.txt | 12 ------------
fake-svm-light | 14 --------------
mem-usage | 11 -----------
ruby-eval | 6 ------
svm-light-fmt-conv | 22 ++++++++++++++++++++++
svm-light-fmt-fake | 14 ++++++++++++++
take-mem | 18 ------------------
test/filter-features/dense-features.txt | 12 ++++++++++++
9 files changed, 48 insertions(+), 83 deletions(-)
delete mode 100755 convert-to-svm-light-format
delete mode 100644 dense-features.txt
delete mode 100755 fake-svm-light
delete mode 100755 mem-usage
delete mode 100755 ruby-eval
create mode 100755 svm-light-fmt-conv
create mode 100755 svm-light-fmt-fake
delete mode 100755 take-mem
create mode 100644 test/filter-features/dense-features.txt
diff --git a/convert-to-svm-light-format b/convert-to-svm-light-format
deleted file mode 100755
index a9ce98f..0000000
--- a/convert-to-svm-light-format
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'zipf'
-
-fd = Marshal.load ReadFile.read ARGV[0]
-d = fd.size
-
-not_quiet = ARGV[1]
-train = []
-l_i = 1
-while line = STDIN.gets
- STDERR.write "#{l_i}\n" if l_i%1000==0&¬_quiet
- s = []
- line.split.each { |i|
- k,w = i.split '=', 2
- s << [fd[k]+1, w.to_f]
- }
- s.sort_by! { |i| i.first }
- puts "+1 #{s.map{|i| "#{i.first}:#{i[1]}" }.join(' ')}"
- l_i+= 1
-end
-
diff --git a/dense-features.txt b/dense-features.txt
deleted file mode 100644
index daae8d1..0000000
--- a/dense-features.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-CountEF
-EgivenFCoherent
-Glue
-IsSingletonF
-IsSingletonFE
-LanguageModel
-LanguageModel_OOV
-MaxLexFgivenE
-MaxLexEgivenF
-PassThrough
-SampleCountF
-WordPenalty
diff --git a/fake-svm-light b/fake-svm-light
deleted file mode 100755
index eb074c1..0000000
--- a/fake-svm-light
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-
-while line = STDIN.gets
- a = line.split
- label = a.shift.to_f
- label *= -1
- a.map! { |i|
- k,v = i.split ":"
- v = v.to_f*-1
- "#{k}:#{v}"
- }
- puts "#{label} #{a.join ' '}"
-end
-
diff --git a/mem-usage b/mem-usage
deleted file mode 100755
index 5c2104f..0000000
--- a/mem-usage
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-"$@" &
-pid=$! peak=0
-while true; do
- sleep 1
- sample="$(ps -o rss= $pid 2> /dev/null)" || break
- let peak='sample > peak ? sample : peak'
-done
-echo "$(( ${peak%% *} / 1024)) m"
-
diff --git a/ruby-eval b/ruby-eval
deleted file mode 100755
index fe0d181..0000000
--- a/ruby-eval
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env ruby
-
-while line = STDIN.gets
- puts "#{eval line}"
-end
-
diff --git a/svm-light-fmt-conv b/svm-light-fmt-conv
new file mode 100755
index 0000000..a9ce98f
--- /dev/null
+++ b/svm-light-fmt-conv
@@ -0,0 +1,22 @@
+#!/usr/bin/env ruby
+
+require 'zipf'
+
+fd = Marshal.load ReadFile.read ARGV[0]
+d = fd.size
+
+not_quiet = ARGV[1]
+train = []
+l_i = 1
+while line = STDIN.gets
+ STDERR.write "#{l_i}\n" if l_i%1000==0&¬_quiet
+ s = []
+ line.split.each { |i|
+ k,w = i.split '=', 2
+ s << [fd[k]+1, w.to_f]
+ }
+ s.sort_by! { |i| i.first }
+ puts "+1 #{s.map{|i| "#{i.first}:#{i[1]}" }.join(' ')}"
+ l_i+= 1
+end
+
diff --git a/svm-light-fmt-fake b/svm-light-fmt-fake
new file mode 100755
index 0000000..eb074c1
--- /dev/null
+++ b/svm-light-fmt-fake
@@ -0,0 +1,14 @@
+#!/usr/bin/env ruby
+
+while line = STDIN.gets
+ a = line.split
+ label = a.shift.to_f
+ label *= -1
+ a.map! { |i|
+ k,v = i.split ":"
+ v = v.to_f*-1
+ "#{k}:#{v}"
+ }
+ puts "#{label} #{a.join ' '}"
+end
+
diff --git a/take-mem b/take-mem
deleted file mode 100755
index 57289a5..0000000
--- a/take-mem
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-
-import sys
-import time
-
-if len(sys.argv) != 2:
- print "usage: fillmem