From 1f71022e124e7134106513bb38a01a5f6fd66da1 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Wed, 13 May 2015 18:08:58 +0200
Subject: gitignore
---
net_test/run.rb | 87 ---------------------------------------------------------
1 file changed, 87 deletions(-)
delete mode 100755 net_test/run.rb
(limited to 'net_test/run.rb')
diff --git a/net_test/run.rb b/net_test/run.rb
deleted file mode 100755
index 7cf01c7a..00000000
--- a/net_test/run.rb
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'nanomsg'
-require 'zipf'
-
-work_dir = "work"
-`mkdir -p #{work_dir}`
-
-# start daemons
-# extractor
-extractor_url = 'tcp://127.0.0.1:60000'
-extractor_sock = NanoMsg::PairSocket.new
-puts "starting extractor .."
-extractor = fork do
- exec "python -m cdec.sa.extract -c extract.ini --online -u -S '#{extractor_url}' &>#{work_dir}/extractor.out"
-end
-Process.detach extractor
-extractor_sock.connect extractor_url
-puts "> got #{extractor_sock.recv} from extractor"
-`mkdir -p #{work_dir}/g`
-
-# aligner
-aligner_url = 'tcp://127.0.0.1:60001'
-aligner_sock = NanoMsg::PairSocket.new
-puts "starting aligner .."
-aligner = fork do
- exec "../word-aligner/net_fa --sock_url '#{aligner_url}' -f a/ef &>#{work_dir}/net_fa.out"
-end
-Process.detach aligner
-aligner_sock.connect aligner_url
-puts "> got #{aligner_sock.recv} from aligner"
-
-# dtrain
-dtrain_url = 'tcp://127.0.0.1:60002'
-dtrain_sock = NanoMsg::PairSocket.new
-puts "starting dtrain .."
-dtrain = fork do
- exec "../training/dtrain/dtrain_net_interface -c dtrain.ini -o #{work_dir}/weights.final -a '#{dtrain_url}' &>#{work_dir}/dtrain.out"
-end
-Process.detach dtrain
-dtrain_sock.connect dtrain_url
-puts "> got #{dtrain_sock.recv} from dtrain"
-
-puts ">>> all daemons ready\n\n"
-
-i = 0
-while line = STDIN.gets
- source, reference = splitpipe(line.strip)
- source.strip!; reference.strip!
- puts "source: '#{source}'"
- puts "reference: '#{reference}'"
- generate_grammar = "TEST ||| #{source} ||| #{work_dir}/g/#{i}.grammar"
- puts "[extractor] generate grammar: '#{generate_grammar}'"
- extractor_sock.send generate_grammar
- grammar = extractor_sock.recv.strip
- annotated_source = "