<commit_before>#include <boost/program_options.hpp>

#include <qi/application.hpp>
#include <qimessaging/session.hpp>

static std::vector<std::string> modules;
static std::string listenTo;
static std::string sd;

_QI_COMMAND_LINE_OPTIONS(
  ("module,m",value<std::vector<std::string> >(&modules) , "Load given module")
  ("listen,l", value<std::string>(&listenTo), "Address to listen to (default: localhost)")
  ("master-address,m", value<std::string>(&sd), "Address of the service directory")
  )


int main(int argc, char** argv)
{
  qi::Application app(argc, argv);
  qi::Session s;
  qiLogDebug("qi.launch") << "Connection to sd at " << sd;
  s.connect(sd);
  if (listenTo.empty())
    listenTo = "tcp://localhost:0";
  s.listen(listenTo);
  for (unsigned i=0; i<modules.size(); ++i)
  {
    qiLogDebug("qi.launch") << "loading " << modules[i];
    s.loadService(modules[i]);
  }
  app.run();
}
<commit_msg>adapt to _QI_COMMAND_LINE_OPTIONS modification.<commit_after>#include <boost/program_options.hpp>

#include <qi/application.hpp>
#include <qimessaging/session.hpp>

static std::vector<std::string> modules;
static std::string listenTo;
static std::string sd;

_QI_COMMAND_LINE_OPTIONS(
  "Launcher options",
  ("module,m",value<std::vector<std::string> >(&modules) , "Load given module")
  ("listen,l", value<std::string>(&listenTo), "Address to listen to (default: localhost)")
  ("master-address,m", value<std::string>(&sd), "Address of the service directory")
)


int main(int argc, char** argv)
{
  qi::Application app(argc, argv);
  qi::Session s;
  qiLogDebug("qi.launch") << "Connection to sd at " << sd;
  s.connect(sd);
  if (listenTo.empty())
    listenTo = "tcp://localhost:0";
  s.listen(listenTo);
  for (unsigned i=0; i<modules.size(); ++i)
  {
    qiLogDebug("qi.launch") << "loading " << modules[i];
    s.loadService(modules[i]);
  }
  app.run();
}

{'fraction_non_alphanumeric': 0.1886993603411514, 'fraction_numerical': 0.0021321961620469083, 'mean_word_length': 5.406143344709897, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4520736', 'n_tokens_mistral': 682, 'n_tokens_neox': 660, 'n_words': 141}