summaryrefslogtreecommitdiff
path: root/training/dtrain/dtrain_net_interface.cc
diff options
context:
space:
mode:
Diffstat (limited to 'training/dtrain/dtrain_net_interface.cc')
-rw-r--r--training/dtrain/dtrain_net_interface.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/training/dtrain/dtrain_net_interface.cc b/training/dtrain/dtrain_net_interface.cc
index 01b110b4..f16b9304 100644
--- a/training/dtrain/dtrain_net_interface.cc
+++ b/training/dtrain/dtrain_net_interface.cc
@@ -28,6 +28,7 @@ main(int argc, char** argv)
boost::split(dense_features, conf["dense_features"].as<string>(),
boost::is_any_of(" "));
const bool output_derivation = conf["output_derivation"].as<bool>();
+ const bool output_rules = conf["output_rules"].as<bool>();
// setup decoder
register_feature_functions();
@@ -132,6 +133,9 @@ main(int argc, char** argv)
} else {
PrintWordIDVec((*samples)[0].w, os);
}
+ if (output_rules) {
+ os << observer->GetViterbiRules() << endl;
+ }
sock.send(os.str().c_str(), os.str().size()+1, 0);
cerr << "[dtrain] done translating, looping again" << endl;
continue;