mosesdecoder/contrib/other-builds/moses2/StaticData.cpp

27 lines
448 B
C++
Raw Normal View History

2015-10-23 20:33:12 +03:00
/*
* StaticData.cpp
*
* Created on: 23 Oct 2015
* Author: hieu
*/
#include "StaticData.h"
2015-10-24 04:02:50 +03:00
#include "PhraseTable.h"
#include "moses/Util.h"
2015-10-23 20:33:12 +03:00
2015-10-24 14:39:15 +03:00
StaticData::StaticData()
:m_ffStartInd(0)
{
PhraseTable *pt = new PhraseTable(m_ffStartInd);
2015-10-24 15:19:42 +03:00
pt->SetPtInd(m_phraseTables.size());
2015-10-24 04:02:50 +03:00
pt->Load(*this);
2015-10-24 15:19:42 +03:00
2015-10-24 04:02:50 +03:00
m_featureFunctions.push_back(pt);
2015-10-24 14:39:15 +03:00
m_phraseTables.push_back(pt);
2015-10-23 20:33:12 +03:00
}
StaticData::~StaticData() {
2015-10-24 04:02:50 +03:00
Moses::RemoveAllInColl(m_featureFunctions);
2015-10-23 20:33:12 +03:00
}