2015-10-24 01:19:31 +03:00
|
|
|
/*
|
|
|
|
* InputPath.cpp
|
|
|
|
*
|
|
|
|
* Created on: 23 Oct 2015
|
|
|
|
* Author: hieu
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "InputPath.h"
|
2015-11-04 16:09:53 +03:00
|
|
|
#include "TranslationModel/PhraseTable.h"
|
2015-10-24 01:19:31 +03:00
|
|
|
|
2015-10-25 18:58:26 +03:00
|
|
|
InputPath::InputPath(const SubPhrase &subPhrase, const Moses::Range &range, size_t numPt)
|
2015-10-24 01:19:31 +03:00
|
|
|
:m_subPhrase(subPhrase)
|
|
|
|
,m_range(range)
|
2015-10-24 15:31:43 +03:00
|
|
|
,m_targetPhrases(numPt)
|
2015-10-24 01:19:31 +03:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
InputPath::~InputPath() {
|
|
|
|
// TODO Auto-generated destructor stub
|
|
|
|
}
|
|
|
|
|
2015-10-28 21:26:54 +03:00
|
|
|
void InputPath::AddTargetPhrases(const PhraseTable &pt, TargetPhrases::shared_const_ptr tps)
|
2015-10-26 19:14:17 +03:00
|
|
|
{
|
|
|
|
size_t ptInd = pt.GetPtInd();
|
|
|
|
m_targetPhrases[ptInd] = tps;
|
|
|
|
}
|
2015-10-26 19:32:47 +03:00
|
|
|
|
|
|
|
std::ostream& operator<<(std::ostream &out, const InputPath &obj)
|
|
|
|
{
|
2015-10-26 21:42:42 +03:00
|
|
|
out << obj.m_range << " " << obj.m_subPhrase;
|
2015-10-26 19:32:47 +03:00
|
|
|
return out;
|
|
|
|
}
|