diff options
author | Patrick Simianer <p@simianer.de> | 2015-03-25 15:39:29 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-03-25 15:39:29 +0100 |
commit | ce920c84348050d2bd2861c1ce4e645a8690afc1 (patch) | |
tree | 4b9f7e8709ed123e669c6c89a8c0231997d926bc | |
parent | 9aa075c79122709d8d5b8adf8c91ebd348eac658 (diff) |
unified feed.rb feed.cc, README
-rw-r--r-- | decoder/README.net | 8 | ||||
-rw-r--r-- | decoder/feed.cc | 2 | ||||
-rwxr-xr-x | decoder/feed.rb | 1 |
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" |