diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-05-11 02:30:32 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-05-11 02:30:32 +0300 |
commit | 8a174beb44eb73d3134186b7551dd75efae01cdc (patch) | |
tree | 04465f40dee3c517e50d5407bc29fde93d752100 | |
parent | 8e6eb067bca1ee4f9d36cb2c305f7ac60b81f230 (diff) |
Additional check for document map if document bias is requested.
-rw-r--r-- | moses/TranslationModel/UG/mm/ug_bitext.h | 2 |
1 files changed, 2 insertions, 0 deletions
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<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; |