[irstlm] 59/78: changes to make the master branch compatible with MMT project

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


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

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

commit 2832762997670c6ee3fb0fc0593f3e78148ab127
Author: Nicola Bertoldi <bertoldi at fbk.eu>
Date:   Wed Dec 2 16:28:12 2015 +0100

    changes to make the master branch compatible with MMT project
---
 src/lmContainer.h | 13 ++++++++++++-
 src/util.h        |  3 +++
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/lmContainer.h b/src/lmContainer.h
index 4707939..40aaa3a 100644
--- a/src/lmContainer.h
+++ b/src/lmContainer.h
@@ -155,8 +155,19 @@ namespace irstlm {
 			MY_ASSERT (ong.size == ngsize);
 			
 			return clprob(ong, bow, bol, maxsuffidx, maxsuffptr, statesize, extendible, lastbow);
-		};
+		}
 		
+		virtual double clprob(ngram ng, topic_map_t& topic_weights, double* bow=NULL, int* bol=NULL, ngram_state_t* maxsuffidx=NULL, char** maxsuffptr=NULL, unsigned int* statesize=NULL,bool* extendible=NULL, double* lastbow=NULL)
+		{
+			UNUSED(topic_weights);		
+			return clprob(ng, bow, bol, maxsuffidx, maxsuffptr, statesize, extendible, lastbow);
+		}
+		virtual double clprob(int* ng, int ngsize, topic_map_t& topic_weights, double* bow=NULL, int* bol=NULL, ngram_state_t* maxsuffidx=NULL, char** maxsuffptr=NULL, unsigned int* statesize=NULL,bool* extendible=NULL, double* lastbow=NULL)
+		{
+			UNUSED(topic_weights);		
+			return clprob(ng, ngsize, bow, bol, maxsuffidx, maxsuffptr, statesize, extendible, lastbow);
+		}
+
 		virtual const char *cmaxsuffptr(ngram ng, unsigned int* statesize=NULL)
 		{
 			UNUSED(ng);
diff --git a/src/util.h b/src/util.h
index 3db4416..4edf23f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -7,6 +7,7 @@
 #include <string>
 #include <iostream>
 #include <fstream>
+#include <map>
 #include <assert.h>
 
 using namespace std;
@@ -49,6 +50,8 @@ using namespace std;
 #define BUCKET 10000
 #define SSEED 50
 
+typedef std::map< std::string, float > topic_map_t;
+
 class ngram;
 typedef unsigned int  ngram_state_t; //type for pointing to a full ngram in the table
 

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