From 3dcf749695b64954eef081f81043d9f4a5e37b64 Mon Sep 17 00:00:00 2001
From: Patrick Simianer
Date: Tue, 20 Jan 2015 19:46:50 +0100
Subject: fix
---
training/dtrain/dtrain.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'training/dtrain')
diff --git a/training/dtrain/dtrain.cc b/training/dtrain/dtrain.cc
index ccb50af2..823a50de 100644
--- a/training/dtrain/dtrain.cc
+++ b/training/dtrain/dtrain.cc
@@ -311,7 +311,7 @@ main(int argc, char** argv)
{
string in;
- string ref;
+ vector ref;
bool next = false, stop = false; // next iteration or premature stop
if (t == 0) {
if(!getline(*input, in)) next = true;
@@ -319,7 +319,8 @@ main(int argc, char** argv)
vector strs;
boost::algorithm::split_regex(strs, in, boost::regex(" \\|\\|\\| "));
in = strs[0];
- ref = strs[1];
+ strs.erase(strs.begin());
+ ref = strs;
}
} else {
if (ii == in_sz) next = true; // stop if we reach the end of our input
@@ -355,7 +356,7 @@ main(int argc, char** argv)
lambdas.init_vector(&decoder_weights);
// getting input
- vector ref_ids; // reference as vector
+ vector ref_ids; // reference as vector
if (t == 0) {
if (!read_bitext) {
getline(*refs, ref);
--
cgit v1.2.3