Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2015-11-06 14:51:14 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-11-06 14:51:14 +0300
commitd3e79a63edc0be88bd603455462b1e8161208608 (patch)
treee2d9f70c5f7609d3842be6bcf0a2d1cb1aff0182 /moses/Hypothesis.cpp
parent713ba3b2c40fb172a8588f179c33c97026c591a2 (diff)
count number of hypos
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r--moses/Hypothesis.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/moses/Hypothesis.cpp b/moses/Hypothesis.cpp
index 44124bc81..34cbbcfea 100644
--- a/moses/Hypothesis.cpp
+++ b/moses/Hypothesis.cpp
@@ -43,6 +43,8 @@ using namespace std;
namespace Moses
{
+size_t g_numHypos = 0;
+
Hypothesis::
Hypothesis(Manager& manager, InputType const& source, const TranslationOption &initialTransOpt, const Bitmap &bitmap)
: m_prevHypo(NULL)
@@ -61,6 +63,7 @@ Hypothesis(Manager& manager, InputType const& source, const TranslationOption &i
, m_manager(manager)
, m_id(m_manager.GetNextHypoId())
{
+ ++g_numHypos;
// used for initial seeding of trans process
// initialize scores
//_hash_computed = false;
@@ -92,6 +95,8 @@ Hypothesis(const Hypothesis &prevHypo, const TranslationOption &transOpt, const
, m_manager(prevHypo.GetManager())
, m_id(m_manager.GetNextHypoId())
{
+ ++g_numHypos;
+
m_currScoreBreakdown.PlusEquals(transOpt.GetScoreBreakdown());
m_wordDeleted = transOpt.IsDeletionOption();
m_manager.GetSentenceStats().AddCreated();