mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
output alignments into file down. Alignments for n-best todo
This commit is contained in:
parent
90b251a50f
commit
2c214c7a21
@ -734,7 +734,7 @@ size_t IOWrapper::OutputAlignment(Alignments &retAlign, const Moses::ChartHypoth
|
|||||||
pair<size_t, size_t> alignPoint(source + sourceOffsets[source]
|
pair<size_t, size_t> alignPoint(source + sourceOffsets[source]
|
||||||
,target + targetOffsets[target]);
|
,target + targetOffsets[target]);
|
||||||
pair<Alignments::iterator, bool> ret = retAlign.insert(alignPoint);
|
pair<Alignments::iterator, bool> ret = retAlign.insert(alignPoint);
|
||||||
assert(ret.second);
|
CHECK(ret.second);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -751,9 +751,9 @@ void IOWrapper::OutputAlignment(vector< set<size_t> > &retAlignmentsS2T, const A
|
|||||||
for (it = alignments.begin(); it != alignments.end(); ++it) {
|
for (it = alignments.begin(); it != alignments.end(); ++it) {
|
||||||
const std::pair<size_t,size_t> &alignPoint = **it;
|
const std::pair<size_t,size_t> &alignPoint = **it;
|
||||||
|
|
||||||
assert(alignPoint.first < retAlignmentsS2T.size());
|
CHECK(alignPoint.first < retAlignmentsS2T.size());
|
||||||
pair<set<size_t>::iterator, bool> ret = retAlignmentsS2T[alignPoint.first].insert(alignPoint.second);
|
pair<set<size_t>::iterator, bool> ret = retAlignmentsS2T[alignPoint.first].insert(alignPoint.second);
|
||||||
assert(ret.second);
|
CHECK(ret.second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user