[irstlm] 109/126: bug fixed

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:46:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

giuliopaci-guest pushed a commit to annotated tag adaptiveLM.v0.1
in repository irstlm.

commit 97fb7a020c255c93e507ef223fc2faaf35b439ac
Author: Nicola Bertoldi <bertoldi at fbk.eu>
Date:   Mon Sep 28 16:04:53 2015 +0200

    bug fixed
---
 src/context-similarity.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/context-similarity.cpp b/src/context-similarity.cpp
index 31dd4db..efd660e 100644
--- a/src/context-similarity.cpp
+++ b/src/context-similarity.cpp
@@ -500,10 +500,11 @@ namespace irstlm {
 				ret_log10_pr = log10(ret_pr);
 			}
 			else{
-				//this word sequence is not reliable enough, because occurrences of base_den_ng are too little
-				//return an uninforming score (log(1.0) = 0.0)
-				ret_log10_pr = 0.0;
-				VERBOSE(3, "CURRENT ret_pr:" << 1.0 << std::endl);
+				//this word sequence is not reliable enough, because occurrences of ng are too little
+				//return an uninforming score (log10(1/K) = -log10(K))
+				ret_log10_pr = -log(m_topic_size)/M_LN10;
+//				ret_log10_pr = 0.0;
+				VERBOSE(3, "CURRENT ret_pr:" << pow(10.0,ret_log10_pr) << std::endl);
 			}
 			
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/irstlm.git



More information about the debian-science-commits mailing list