mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-08-16 23:10:31 +03:00
Fix suggested by Martin Baumgärtner to keep server from crashing when packing word alignments.
This commit is contained in:
parent
c8b859de67
commit
ca038c5e4c
@ -15,8 +15,8 @@ namespace Moses {
|
||||
vector<pair<size_t,size_t> const* > a
|
||||
= this->GetCurrTargetPhrase().GetAlignTerm().GetSortedAlignments(waso);
|
||||
typedef pair<size_t,size_t> item;
|
||||
map<string, xmlrpc_c::value> M;
|
||||
BOOST_FOREACH(item const* p, a) {
|
||||
map<string, xmlrpc_c::value> M;
|
||||
M["source-word"] = xmlrpc_c::value_int(src.GetStartPos() + p->first);
|
||||
M["target-word"] = xmlrpc_c::value_int(trg.GetStartPos() + p->second);
|
||||
dest.push_back(xmlrpc_c::value_struct(M));
|
||||
|
Loading…
Reference in New Issue
Block a user