debugging method for source phrase

This commit is contained in:
Hieu Hoang 2016-04-27 23:30:24 +01:00
parent f84e9c60e0
commit aaa3f24109
2 changed files with 5 additions and 6 deletions

View File

@ -14,6 +14,7 @@
#include "MemPool.h"
#include "TypeDef.h"
#include "legacy/FactorCollection.h"
#include "SCFG/Word.h"
namespace Moses2
{
@ -120,20 +121,18 @@ inline std::ostream& operator<<(std::ostream &out, const Phrase<Moses2::Word> &o
}
return out;
}
/*
template<typename WORD>
inline std::ostream& operator<<(std::ostream &out, const Phrase<WORD> &obj)
inline std::ostream& operator<<(std::ostream &out, const Phrase<SCFG::Word> &obj)
{
if (obj.GetSize()) {
out << obj[0];
for (size_t i = 1; i < obj.GetSize(); ++i) {
const WORD &word = obj[i];
const SCFG::Word &word = obj[i];
out << " " << word;
}
}
return out;
}
*/
////////////////////////////////////////////////////////////////////////
template<typename WORD>

View File

@ -95,7 +95,7 @@ void PhraseTableMemory::Load(System &system)
SCFG::TargetPhraseImpl *target = SCFG::TargetPhraseImpl::CreateFromString(systemPool, *this,
system, toks[1]);
target->SetAlignmentInfo(toks[3]);
cerr << "created target " << *target << endl;
//cerr << "created target " << *target << " source=" << *source << endl;
target->GetScores().CreateFromString(toks[2], *this, system, true);
//cerr << "created scores:" << *target << endl;