summaryrefslogtreecommitdiff
path: root/decoder/cdec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/cdec.cc')
-rw-r--r--decoder/cdec.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/decoder/cdec.cc b/decoder/cdec.cc
index b47ab380..5c40f56e 100644
--- a/decoder/cdec.cc
+++ b/decoder/cdec.cc
@@ -12,6 +12,7 @@ int main(int argc, char** argv) {
Decoder decoder(argc, argv);
const string input = decoder.GetConf()["input"].as<string>();
+ const bool show_feature_dictionary = decoder.GetConf().count("show_feature_dictionary");
if (!SILENT) cerr << "Reading input from " << ((input == "-") ? "STDIN" : input.c_str()) << endl;
ReadFile in_read(input);
istream *in = in_read.stream();
@@ -23,6 +24,12 @@ int main(int argc, char** argv) {
if (buf.empty()) continue;
decoder.Decode(buf);
}
+ if (show_feature_dictionary) {
+ int num = FD::NumFeats();
+ for (int i = 1; i < num; ++i) {
+ cout << FD::Convert(i) << endl;
+ }
+ }
return 0;
}