Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Germann <ugermann@inf.ed.ac.uk>2015-05-11 02:33:21 +0300
committerUlrich Germann <ugermann@inf.ed.ac.uk>2015-05-11 02:33:21 +0300
commitdb5ccff364508f9348b2d20d6ac57bc9da38bedf (patch)
treec6c820a627da04d3d764cc18c7230ace40e1392b
parent1778238d73dcb328a145d7c9320254a5552d0711 (diff)
Tweaks to logging for biased sampling.
-rw-r--r--moses/TranslationModel/UG/mmsapt.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/moses/TranslationModel/UG/mmsapt.cpp b/moses/TranslationModel/UG/mmsapt.cpp
index 6e680bbc5..2b11da968 100644
--- a/moses/TranslationModel/UG/mmsapt.cpp
+++ b/moses/TranslationModel/UG/mmsapt.cpp
@@ -205,7 +205,11 @@ namespace Moses
if ((m = param.find("bias-server")) != param.end())
m_bias_server = m->second;
-
+ if (m_bias_loglevel)
+ {
+ dflt = pair<string,string>("bias-logfile","/dev/stderr");
+ param.insert(dflt);
+ }
if ((m = param.find("bias-logfile")) != param.end())
{
m_bias_logfile = m->second;
@@ -213,7 +217,7 @@ namespace Moses
m_bias_log = &std::cerr;
else if (m_bias_logfile == "/dev/stdout")
m_bias_log = &std::cout;
- else
+ else
{
m_bias_logger.reset(new ofstream(m_bias_logfile.c_str()));
m_bias_log = m_bias_logger.get();
@@ -692,7 +696,7 @@ namespace Moses
else ret->Prune(true,ret->GetSize());
#if 1
- if (m_bias_log && m_lr_func)
+ if (m_bias_log && m_lr_func && m_bias_loglevel > 3)
{
typename PhrasePair<Token>::SortDescendingByJointCount sorter;
sort(ppfix.begin(), ppfix.end(),sorter);