summaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2011-02-13 22:41:46 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2011-02-13 22:41:46 -0500
commit78f1644ae064dffabc59b1bf7bf3ded3dc3171db (patch)
treefe7c3116dd942f252173e2d4f8b1695c96783195 /decoder
parent8c4a347f5f224b0a50bbb1d0b250ee96aad31f72 (diff)
phrasinator v1
Diffstat (limited to 'decoder')
-rw-r--r--decoder/cdec.cc3
-rw-r--r--decoder/decoder.cc8
2 files changed, 7 insertions, 4 deletions
diff --git a/decoder/cdec.cc b/decoder/cdec.cc
index 5b930c69..b47ab380 100644
--- a/decoder/cdec.cc
+++ b/decoder/cdec.cc
@@ -3,6 +3,7 @@
#include "filelib.h"
#include "decoder.h"
#include "ff_register.h"
+#include "verbose.h"
using namespace std;
@@ -11,7 +12,7 @@ int main(int argc, char** argv) {
Decoder decoder(argc, argv);
const string input = decoder.GetConf()["input"].as<string>();
- cerr << "Reading input from " << ((input == "-") ? "STDIN" : input.c_str()) << endl;
+ if (!SILENT) cerr << "Reading input from " << ((input == "-") ? "STDIN" : input.c_str()) << endl;
ReadFile in_read(input);
istream *in = in_read.stream();
assert(*in);
diff --git a/decoder/decoder.cc b/decoder/decoder.cc
index 478a1cf3..3d818429 100644
--- a/decoder/decoder.cc
+++ b/decoder/decoder.cc
@@ -453,7 +453,9 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream
cout << endl;
exit(0);
}
- ShowBanner();
+ if (conf.count("quiet"))
+ SetSilent(true);
+ if (!SILENT) ShowBanner();
}
if (conf.count("show_config")) // special handling needed because we only want to notify() once.
show_config=true;
@@ -467,6 +469,8 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream
po::store(po::parse_config_file(*conff, dconfig_options), conf);
}
}
+ if (conf.count("quiet"))
+ SetSilent(true);
if (cfg) po::store(po::parse_config_file(*cfg, dconfig_options), conf);
po::notify(conf);
if (show_config && !cfg_files.empty()) {
@@ -482,8 +486,6 @@ DecoderImpl::DecoderImpl(po::variables_map& conf, int argc, char** argv, istream
cerr<<" "<<argv[i];
cerr << "\n\n";
}
- if (conf.count("quiet"))
- SetSilent(true);
if (conf.count("list_feature_functions")) {
cerr << "Available feature functions (specify with -F; describe with -u FeatureName):\n";