check to make sure there is an InputFeature when decoding lattice or confusion network

This commit is contained in:
Hieu Hoang 2013-09-23 22:20:58 +01:00
parent e6d652aea5
commit 0237c8e3fe
2 changed files with 7 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include "Sentence.h"
#include "UserMessage.h"
#include "moses/FF/InputFeature.h"
#include "util/check.hh"
namespace Moses
{
@ -69,6 +70,7 @@ ConfusionNet::ConfusionNet()
if (staticData.IsChart()) {
m_defaultLabelSet.insert(StaticData::Instance().GetInputDefaultNonTerminal());
}
CHECK(StaticData::Instance().GetInputFeature());
}
ConfusionNet::~ConfusionNet()
{

View File

@ -5,10 +5,14 @@
#include "Util.h"
#include "FloydWarshall.h"
#include "moses/FF/InputFeature.h"
#include "util/check.hh"
namespace Moses
{
WordLattice::WordLattice() {}
WordLattice::WordLattice()
{
CHECK(StaticData::Instance().GetInputFeature());
}
size_t WordLattice::GetColumnIncrement(size_t i, size_t j) const
{