Additional check for document map if document bias is requested.

This commit is contained in:
Ulrich Germann 2015-05-11 00:30:32 +01:00
parent 8e6eb067bc
commit 8a174beb44

View File

@ -417,6 +417,8 @@ namespace Moses {
( string const& bserver, string const& text, ostream* log ) const
{
sptr<DocumentBias> ret;
UTIL_THROW_IF2(m_sid2docid == NULL,
"Document bias requested but no document map loaded.");
ret.reset(new DocumentBias(*m_sid2docid, m_docname2docid,
bserver, text, log));
return ret;