diff options
author | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-06-08 15:45:51 +0300 |
---|---|---|
committer | Ulrich Germann <ugermann@inf.ed.ac.uk> | 2015-06-08 15:45:51 +0300 |
commit | e8a4a9b10a5bd07097122f3e9e6529ac7a441b0b (patch) | |
tree | a472aa921282485da0966c25f2445157ce590094 /moses/TranslationModel | |
parent | d5b0ec7562b018c55144c78a8f3776de28d0ce63 (diff) |
New member function to expose mapping from sentence IDs to document ids.
Diffstat (limited to 'moses/TranslationModel')
-rw-r--r-- | moses/TranslationModel/UG/mm/ug_bitext.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/moses/TranslationModel/UG/mm/ug_bitext.h b/moses/TranslationModel/UG/mm/ug_bitext.h index 1b1c95c27..396f2b7dd 100644 --- a/moses/TranslationModel/UG/mm/ug_bitext.h +++ b/moses/TranslationModel/UG/mm/ug_bitext.h @@ -206,6 +206,7 @@ namespace Moses { string docname(id_type const sid) const; + vector<id_type> const* sid2did() const; }; #include "ug_bitext_agenda.h" @@ -222,6 +223,14 @@ namespace Moses { } template<typename Token> + vector<id_type> const* + Bitext<Token>:: + sid2did() const + { + return m_sid2docid.get(); + } + + template<typename Token> sptr<SentenceBias> Bitext<Token>:: loadSentenceBias(string const& fname) const |