diff --git a/moses/TranslationModel/UG/mm/ug_bitext.h b/moses/TranslationModel/UG/mm/ug_bitext.h index 201569fb0..29e8c551c 100644 --- a/moses/TranslationModel/UG/mm/ug_bitext.h +++ b/moses/TranslationModel/UG/mm/ug_bitext.h @@ -64,6 +64,7 @@ #include "ug_lexical_reordering.h" #include "ug_sampling_bias.h" #include "ug_phrasepair.h" +#include "ug_phrase_extraction_record.h" #include "moses/TranslationModel/UG/generic/threading/ug_ref_counter.h" #define PSTATS_CACHE_THRESHOLD 50 @@ -146,6 +147,8 @@ namespace Moses { bitvector* full_alignment, // stores full word alignment for this sent. bool const flip) const; // flip source and target (reverse lookup) + bool find_trg_phr_bounds(PhraseExtractionRecord& rec) const; + // prep2 launches sampling and returns immediately. // lookup (below) waits for the job to finish before it returns sptr @@ -319,12 +322,22 @@ namespace Moses { void operator()(); }; + template + bool + Bitext:: + find_trg_phr_bounds(PhraseExtractionRecord& rec) const + { + return find_trg_phr_bounds(rec.sid, rec.start, rec.stop, + rec.s1, rec.s2, rec.e1, rec.e2, + rec.po_fwd, rec.po_bwd, + rec.aln, rec.full_aln, rec.flip); + } + template bool Bitext:: find_trg_phr_bounds - (size_t const sid, - size_t const start, size_t const stop, + (size_t const sid, size_t const start, size_t const stop, size_t & s1, size_t & s2, size_t & e1, size_t & e2, int & po_fwd, int & po_bwd, std::vector* core_alignment, bitvector* full_alignment,