mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-26 13:23:25 +03:00
delete m_latticeSamplesCollector
This commit is contained in:
parent
056913df57
commit
25db86d16b
@ -81,6 +81,8 @@ IOWrapper::IOWrapper(const std::vector<FactorType> &inputFactorOrder
|
||||
,m_searchGraphOutputCollector(NULL)
|
||||
,m_detailedTranslationCollector(NULL)
|
||||
,m_wordGraphCollector(NULL)
|
||||
,m_latticeSamplesCollector(NULL)
|
||||
|
||||
,m_surpressSingleBestOutput(false)
|
||||
{
|
||||
const StaticData &staticData = StaticData::Instance();
|
||||
@ -187,6 +189,7 @@ IOWrapper::~IOWrapper()
|
||||
delete m_searchGraphOutputCollector;
|
||||
delete m_detailedTranslationCollector;
|
||||
delete m_wordGraphCollector;
|
||||
delete m_latticeSamplesCollector;
|
||||
}
|
||||
|
||||
InputType*
|
||||
|
@ -21,7 +21,6 @@ TranslationTask::TranslationTask(size_t lineNumber, InputType* source, MosesCmd:
|
||||
boost::shared_ptr<HypergraphOutput<Manager> > hypergraphOutput) :
|
||||
m_source(source), m_lineNumber(lineNumber),
|
||||
m_ioWrapper(ioWrapper),
|
||||
m_latticeSamplesCollector(latticeSamplesCollector),
|
||||
m_outputSearchGraphSLF(outputSearchGraphSLF),
|
||||
m_hypergraphOutput(hypergraphOutput)
|
||||
{}
|
||||
@ -250,13 +249,13 @@ void TranslationTask::Run() {
|
||||
}
|
||||
|
||||
//lattice samples
|
||||
if (m_latticeSamplesCollector) {
|
||||
if (m_ioWrapper.GetLatticeSamplesCollector()) {
|
||||
TrellisPathList latticeSamples;
|
||||
ostringstream out;
|
||||
manager.CalcLatticeSamples(staticData.GetLatticeSamplesSize(), latticeSamples);
|
||||
OutputNBest(out,latticeSamples, staticData.GetOutputFactorOrder(), m_lineNumber,
|
||||
staticData.GetReportSegmentation());
|
||||
m_latticeSamplesCollector->Write(m_lineNumber, out.str());
|
||||
m_ioWrapper.GetLatticeSamplesCollector()->Write(m_lineNumber, out.str());
|
||||
}
|
||||
|
||||
// detailed translation reporting
|
||||
|
@ -43,7 +43,6 @@ private:
|
||||
size_t m_lineNumber;
|
||||
MosesCmd::IOWrapper &m_ioWrapper;
|
||||
|
||||
Moses::OutputCollector* m_latticeSamplesCollector;
|
||||
bool m_outputSearchGraphSLF;
|
||||
boost::shared_ptr<Moses::HypergraphOutput<Moses::Manager> > m_hypergraphOutput;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user