diff options
author | Patrick Simianer <p@simianer.de> | 2015-01-20 19:46:50 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-01-20 19:46:50 +0100 |
commit | 3dcf749695b64954eef081f81043d9f4a5e37b64 (patch) | |
tree | cc78f7aa5648520e34880db6541e0500e46c8d92 /training/dtrain | |
parent | 7b8cbb7f43c34c9e068f041ffe9e6fdeebc0c901 (diff) |
fix
Diffstat (limited to 'training/dtrain')
-rw-r--r-- | training/dtrain/dtrain.cc | 7 |
1 files changed, 4 insertions, 3 deletions
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<string> 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<string> 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<WordID> ref_ids; // reference as vector<WordID> + vector<vector<WordID> ref_ids; // reference as vector<WordID> if (t == 0) { if (!read_bitext) { getline(*refs, ref); |