From 8a174beb44eb73d3134186b7551dd75efae01cdc Mon Sep 17 00:00:00 2001 From: Ulrich Germann Date: Mon, 11 May 2015 00:30:32 +0100 Subject: [PATCH] Additional check for document map if document bias is requested. --- moses/TranslationModel/UG/mm/ug_bitext.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/moses/TranslationModel/UG/mm/ug_bitext.h b/moses/TranslationModel/UG/mm/ug_bitext.h index ab5f2a24f..c1a065b0a 100644 --- a/moses/TranslationModel/UG/mm/ug_bitext.h +++ b/moses/TranslationModel/UG/mm/ug_bitext.h @@ -417,6 +417,8 @@ namespace Moses { ( string const& bserver, string const& text, ostream* log ) const { sptr 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;