[irstlm] 45/126: code cleanup

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:46:43 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 31747b99a8ee55990b6d09d446e18eac7b6b6320
Author: Nicola Bertoldi <bertoldi at fbk.eu>
Date:   Tue Aug 4 20:21:14 2015 +0200

    code cleanup
---
 src/compile-lm.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/compile-lm.cpp b/src/compile-lm.cpp
index e5033e5..39aff7d 100644
--- a/src/compile-lm.cpp
+++ b/src/compile-lm.cpp
@@ -370,9 +370,9 @@ int main(int argc, char **argv)
           Nw++;
           sent_Nw++;
           if (sent_PP_flag && (*ng.wordp(1)==eos)) {
-            sent_PP=exp((-sent_logPr * M_LN10) /sent_Nw);
-            sent_PPwp= sent_PP * (1 - 1/exp((sent_Noov *  lmt->getlogOOVpenalty()) * M_LN10 / sent_Nw));
-
+            sent_PP=exp((-sent_logPr * M_LN10) / sent_Nw);
+            sent_PPwp= sent_PP * (1 - 1/exp(sent_Noov * ( lmt->getlogOOVpenalty() * M_LN10 ) / sent_Nw));
+						
             std::cout << "%% sent_Nw=" << sent_Nw
                       << " sent_PP=" << sent_PP
                       << " sent_PPwp=" << sent_PPwp
@@ -393,9 +393,9 @@ int main(int argc, char **argv)
         }
       }
 
-      PP=exp((-logPr * M_LN10) /Nw);
+      PP=exp((-logPr * M_LN10) / Nw);
 
-      PPwp= PP * (1 - 1/exp((Noov *  lmt->getlogOOVpenalty()) * M_LN10 / Nw));
+      PPwp= PP * (1 - 1/exp(Noov * ( lmt->getlogOOVpenalty() * M_LN10 ) / Nw));
 
       std::cout << "%% Nw=" << Nw
                 << " PP=" << PP

-- 
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