diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2015-11-06 14:51:14 +0300 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2015-11-06 14:51:14 +0300 |
commit | d3e79a63edc0be88bd603455462b1e8161208608 (patch) | |
tree | e2d9f70c5f7609d3842be6bcf0a2d1cb1aff0182 /moses/Hypothesis.cpp | |
parent | 713ba3b2c40fb172a8588f179c33c97026c591a2 (diff) |
count number of hypos
Diffstat (limited to 'moses/Hypothesis.cpp')
-rw-r--r-- | moses/Hypothesis.cpp | 5 |
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(); |