From 8a8b092ece4f1404a9f8726b5a54fa0b15a10560 Mon Sep 17 00:00:00 2001 From: Franck Dary <franck.dary@lis-lab.fr> Date: Thu, 18 Apr 2019 09:06:22 +0200 Subject: [PATCH] Added debug option to compute_l_rules --- maca_common/src/macaon_compute_l_rules.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maca_common/src/macaon_compute_l_rules.cpp b/maca_common/src/macaon_compute_l_rules.cpp index d4f425e..ce889ce 100644 --- a/maca_common/src/macaon_compute_l_rules.cpp +++ b/maca_common/src/macaon_compute_l_rules.cpp @@ -93,6 +93,7 @@ int main(int argc, char * argv[]) std::string rulesFilename = vm["rules"].as<std::string>(); int threshold = vm["threshold"].as<int>(); bool strict = vm.count("strict") == 0 ? false : true; + bool debug = vm.count("debug") == 0 ? false : true; File fplm(fplmFilename, "r"); char buffer[100000]; @@ -127,6 +128,16 @@ int main(int argc, char * argv[]) fprintf(exceptionsFile.getDescriptor(), "%s\n", line.c_str()); } + if (debug) + { + for (auto & it : rules) + { + fprintf(stderr, "<%s> : %lu\n", it.first.c_str(), it.second.size()); + for (auto & example : it.second) + fprintf(stderr, "\t<%s>\n", example.c_str()); + } + } + return 0; } -- GitLab