From 9e5be78a7da79c59ca3be429f586f88b4f01d06e Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Thu, 20 Nov 2014 17:28:50 +0000 Subject: [PATCH] simulated post editing --- moses-cmd/Main.cpp | 2 -- moses/IOWrapper.cpp | 13 ++++--------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index cef8379e1..e3008c88f 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -172,7 +172,6 @@ int main(int argc, char** argv) // execute task #ifdef WITH_THREADS #ifdef PT_UG - /* bool spe = params.isParamSpecified("spe-src"); if (spe) { // simulated post-editing: always run single-threaded! @@ -195,7 +194,6 @@ int main(int argc, char** argv) } } else - */ #endif pool.Submit(task); #else diff --git a/moses/IOWrapper.cpp b/moses/IOWrapper.cpp index 2a757a1a7..1810184c6 100644 --- a/moses/IOWrapper.cpp +++ b/moses/IOWrapper.cpp @@ -206,16 +206,11 @@ IOWrapper::IOWrapper(const std::vector &inputFactorOrder m_singleBestOutputCollector = new Moses::OutputCollector(&std::cout); } - /* - const Parameter ¶ms = staticData.GetParameter(); - bool spe = params.isParamSpecified("spe-src"); - if (spe) { - spe_src->open(params.GetParam("spe-src")[0]); - spe_trg->open(params.GetParam("spe-trg")[0]); - spe_aln->open(params.GetParam("spe-aln")[0]); + if (staticData.GetParam("spe-src").size()) { + spe_src = new ifstream(staticData.GetParam("spe-src")[0].c_str()); + spe_trg = new ifstream(staticData.GetParam("spe-trg")[0].c_str()); + spe_aln = new ifstream(staticData.GetParam("spe-aln")[0].c_str()); } - */ - } IOWrapper::~IOWrapper()