diff --git a/moses/TranslationModel/UG/mm/ug_ttrack_base.cc b/moses/TranslationModel/UG/mm/ug_ttrack_base.cc index 60d20a5f9..e754539f6 100644 --- a/moses/TranslationModel/UG/mm/ug_ttrack_base.cc +++ b/moses/TranslationModel/UG/mm/ug_ttrack_base.cc @@ -36,6 +36,13 @@ namespace ugdiss return buf.str(); } + size_t + len_from_pid(uint64_t pid) + { + static uint64_t two16 = uint64_t(1)<<16; + return pid%two16; + } + #if 0 template<> string diff --git a/moses/TranslationModel/UG/mm/ug_ttrack_base.h b/moses/TranslationModel/UG/mm/ug_ttrack_base.h index 9668bee0e..fbbc131ad 100644 --- a/moses/TranslationModel/UG/mm/ug_ttrack_base.h +++ b/moses/TranslationModel/UG/mm/ug_ttrack_base.h @@ -26,6 +26,8 @@ namespace ugdiss typedef boost::dynamic_bitset bdBitset; + size_t len_from_pid(uint64_t pid); + template void parse_pid(uint64_t const pid, sid_t & sid,