diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-20 14:21:50 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-11-20 14:21:50 +0300 |
commit | 8137aeae43d187e7a324e8c1a490f1d8365a8876 (patch) | |
tree | 87436fcc787a6621e16a90ecbcb8926f47a46e05 /moses-cmd | |
parent | 46596ed49a63c5b76f822b3dfff6f10c4da5ef22 (diff) |
Small changes to Parameters and StaticData
Diffstat (limited to 'moses-cmd')
-rw-r--r-- | moses-cmd/Main.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/moses-cmd/Main.cpp b/moses-cmd/Main.cpp index 7e8a4a0e3..cef8379e1 100644 --- a/moses-cmd/Main.cpp +++ b/moses-cmd/Main.cpp @@ -171,6 +171,32 @@ 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! + task->Run(); + delete task; + string src,trg,aln; + UTIL_THROW_IF2(!getline(ioWrapper->spe_src,src), "[" << HERE << "] " + << "missing update data for simulated post-editing."); + UTIL_THROW_IF2(!getline(ioWrapper->spe_trg,trg), "[" << HERE << "] " + << "missing update data for simulated post-editing."); + UTIL_THROW_IF2(!getline(ioWrapper->spe_aln,aln), "[" << HERE << "] " + << "missing update data for simulated post-editing."); + BOOST_FOREACH (PhraseDictionary* pd, PhraseDictionary::GetColl()) + { + Mmsapt* sapt = dynamic_cast<Mmsapt*>(pd); + if (sapt) sapt->add(src,trg,aln); + VERBOSE(1,"[" << HERE << " added src] " << src << endl); + VERBOSE(1,"[" << HERE << " added trg] " << trg << endl); + VERBOSE(1,"[" << HERE << " added aln] " << aln << endl); + } + } + else + */ +#endif pool.Submit(task); #else task->Run(); |