summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
Diffstat (limited to 'decoder')
-rw-r--r--decoder/README.net8
-rw-r--r--decoder/feed.cc2
-rwxr-xr-xdecoder/feed.rb1
3 files changed, 10 insertions, 1 deletions
diff --git a/decoder/README.net b/decoder/README.net
new file mode 100644
index 00000000..05bb66d8
--- /dev/null
+++ b/decoder/README.net
@@ -0,0 +1,8 @@
+to run the server do
+cd ../training/dtrain/examples/standard/
+../../../../decoder/network_decoder cdec.ini
+
+to run the 'feeder' do
+cd ../training/dtrain/examples/standard/
+zcat nc-wmt11.100.gz | ../../../../decoder/feed.rb
+
diff --git a/decoder/feed.cc b/decoder/feed.cc
index 477d6599..f8923fc4 100644
--- a/decoder/feed.cc
+++ b/decoder/feed.cc
@@ -17,7 +17,7 @@ recv(nn::socket& sock)
size_t sz = sock.recv(&buf, NN_MSG, 0);
if (buf) {
string translation(buf, buf+sz);
- cout << "received translation '" << translation << "'" << endl;
+ cout << "got translation '" << translation << "'" << endl << endl;
}
}
diff --git a/decoder/feed.rb b/decoder/feed.rb
index c835536c..5ea9737d 100755
--- a/decoder/feed.rb
+++ b/decoder/feed.rb
@@ -14,6 +14,7 @@ while true
sock.send 'shutdown'
break
end
+ puts "sending source '#{line.strip}'"
sock.send line.strip
sleep 1
puts "got translation: #{sock.recv}\n\n"