mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-09-11 19:27:11 +03:00
get ready for placeholders
This commit is contained in:
parent
b6ae28ecb3
commit
94d2a1895a
@ -139,9 +139,9 @@ void Hypothesis::OutputToStream(std::ostream &out) const
|
||||
}
|
||||
//cerr << *this << endl;
|
||||
|
||||
if (GetTargetPhrase().GetSize()) {
|
||||
const Phrase<Moses2::Word> &phrase = GetTargetPhrase();
|
||||
phrase.OutputToStream(out);
|
||||
const TargetPhrase<Moses2::Word> &tp = GetTargetPhrase();
|
||||
if (tp.GetSize()) {
|
||||
tp.OutputToStream(*this, out);
|
||||
out << " ";
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ std::string TrellisPath::OutputTargetPhrase(const System &system) const
|
||||
const TrellisNode &node = nodes[i];
|
||||
const Hypothesis *hypo = static_cast<const Hypothesis*>(node.GetHypo());
|
||||
//cerr << "hypo=" << hypo << " " << *hypo << endl;
|
||||
hypo->GetTargetPhrase().OutputToStream(out);
|
||||
hypo->GetTargetPhrase().OutputToStream(*hypo, out);
|
||||
out << " ";
|
||||
}
|
||||
return out.str();
|
||||
|
@ -42,6 +42,19 @@ public:
|
||||
SCORE *GetScoresProperty(int propertyInd) const
|
||||
{ return scoreProperties ? scoreProperties + propertyInd : NULL; }
|
||||
|
||||
void OutputToStream(const Hypothesis &hypo, std::ostream &out) const
|
||||
{
|
||||
size_t size = PhraseImplTemplate<WORD>::GetSize();
|
||||
if (size) {
|
||||
(*this)[0].OutputToStream(out);
|
||||
for (size_t i = 1; i < size; ++i) {
|
||||
const WORD &word = (*this)[i];
|
||||
out << " BOO:";
|
||||
word.OutputToStream(out);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
virtual std::string Debug(const System &system) const
|
||||
{
|
||||
std::stringstream out;
|
||||
|
Loading…
Reference in New Issue
Block a user