[irstlm] 33/126: code and output cleanup

Giulio Paci giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:46:42 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 8eebba0ff67dbd5f2ec0d7af7bd403a81be7ec4b
Author: Nicola Bertoldi <bertoldi at fbk.eu>
Date:   Mon Jul 27 17:26:48 2015 +0200

    code and output cleanup
---
 src/context-dependent-evaluation.cpp | 9 +++++----
 src/lmContextDependent.cpp           | 1 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/context-dependent-evaluation.cpp b/src/context-dependent-evaluation.cpp
index 5ac7cd0..2400d10 100644
--- a/src/context-dependent-evaluation.cpp
+++ b/src/context-dependent-evaluation.cpp
@@ -218,14 +218,15 @@ int main(int argc, char **argv)
 					string_vec_t tmp_word_vec(word_vec.begin() + first, word_vec.begin() +last);
 					
 					if (size>=1) {
-						VERBOSE(0,"computing topic_scores for first:|" << first << "| and last:|" << last << "|" << std::endl);	
+						VERBOSE(2,"computing topic_scores for first:|" << first << "| and last:|" << last << "|" << std::endl);	
 						
 						topic_map_t tmp_topic_map;
 						((lmContextDependent*) lmt)->getContextSimilarity()->get_topic_scores(tmp_topic_map, tmp_word_vec);
 						
-						std::cout << "first:" << first << " last:" << last << ((lmContextDependent*) lmt)->getContextDelimiter();
-						((lmContextDependent*) lmt)->getContextSimilarity()->print_topic_scores(tmp_topic_map);
-						
+						VERBOSE(2,std::cout << "first:" << first << " last:" << last << ((lmContextDependent*) lmt)->getContextDelimiter());
+						if (debug > 0){
+							((lmContextDependent*) lmt)->getContextSimilarity()->print_topic_scores(tmp_topic_map);
+						}
 						((lmContextDependent*) lmt)->getContextSimilarity()->add_topic_scores(sentence_topic_map, tmp_topic_map);
 						tmp_topic_map.clear();
 					}
diff --git a/src/lmContextDependent.cpp b/src/lmContextDependent.cpp
index da7e134..dc8e768 100644
--- a/src/lmContextDependent.cpp
+++ b/src/lmContextDependent.cpp
@@ -126,7 +126,6 @@ namespace irstlm {
 		size_t pos = line.find(context_delimiter);	
 		if (pos != std::string::npos){ // context_delimiter is found
 			sentence = line.substr(0, pos);
-			std::cout << sentence << std::endl;
 			line.erase(0, pos + context_delimiter.length());
 			VERBOSE(0,"pos:|" << pos << "|" << std::endl);	
 			VERBOSE(0,"sentence:|" << sentence << "|" << 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