From 3c767fc333f5fe9101a6a4cf67afdc48ddcf8174 Mon Sep 17 00:00:00 2001 From: Ulrich Germann Date: Mon, 8 Jun 2015 13:47:02 +0100 Subject: New field to store cumulative bias scores. --- moses/TranslationModel/UG/mm/ug_bitext_jstats.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'moses/TranslationModel/UG/mm/ug_bitext_jstats.h') diff --git a/moses/TranslationModel/UG/mm/ug_bitext_jstats.h b/moses/TranslationModel/UG/mm/ug_bitext_jstats.h index dade27649..49ba0d810 100644 --- a/moses/TranslationModel/UG/mm/ug_bitext_jstats.h +++ b/moses/TranslationModel/UG/mm/ug_bitext_jstats.h @@ -18,6 +18,7 @@ namespace Moses uint32_t my_rcnt; // unweighted joint count uint32_t my_cnt2; // raw counts L2 float my_wcnt; // weighted joint count + float my_bcnt; // cumulative bias // to do: use a static alignment pattern store that stores each pattern only // once, so that we don't have to store so many alignment vectors @@ -33,9 +34,10 @@ namespace Moses uint32_t rcnt() const; // raw joint counts uint32_t cnt2() const; // raw target phrase occurrence count float wcnt() const; // weighted joint counts + float bcnt() const; // cumulative bias scores vector > > const & aln() const; - void add(float w, vector const& a, uint32_t const cnt2, + void add(float w, float b, vector const& a, uint32_t const cnt2, uint32_t fwd_orient, uint32_t bwd_orient, int const docid); void invalidate(); -- cgit v1.2.3