From 60bcf788b084b62db7899f0bc84ec90fd4bafa99 Mon Sep 17 00:00:00 2001 From: Catarina Silva Date: Tue, 29 Nov 2016 11:55:01 +0000 Subject: [PATCH 1/2] Change beam threshold expression --- src/ttables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ttables.h b/src/ttables.h index 7dc43b3..3c01197 100644 --- a/src/ttables.h +++ b/src/ttables.h @@ -146,7 +146,7 @@ class TTable { double max_p = -1; for (auto& it : cpd) if (it.second > max_p) max_p = it.second; - const double threshold = - log(max_p) * BEAM_THRESHOLD; + const double threshold = log(max_p) + BEAM_THRESHOLD; for (auto& it : cpd) { const std::string& b = d.Convert(it.first); double c = log(it.second); From df01a778442cb506f4a793805f38307786b60a06 Mon Sep 17 00:00:00 2001 From: Catarina Silva Date: Wed, 7 Dec 2016 17:11:06 +0000 Subject: [PATCH 2/2] Changed beam threshold to base 10 --- src/ttables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ttables.h b/src/ttables.h index 3c01197..35576a6 100644 --- a/src/ttables.h +++ b/src/ttables.h @@ -146,7 +146,7 @@ class TTable { double max_p = -1; for (auto& it : cpd) if (it.second > max_p) max_p = it.second; - const double threshold = log(max_p) + BEAM_THRESHOLD; + const double threshold = log(max_p) + (BEAM_THRESHOLD * log(10)); for (auto& it : cpd) { const std::string& b = d.Convert(it.first); double c = log(it.second);