<commit_before>#include "sm/logging.hpp"

#include <string>
#include <boost/algorithm/string.hpp> // for case-insensitive string comparison

/**
 * \brief Returns a Level enum from string
 */
sm::logging::Level sm::logging::levels::fromString(const std::string& l) {
  
//   enum Level
//   {
//       All,
//       Finest,
//       Verbose,
//       Finer,
//       Trace,
//       Fine,
//       Debug,
//       Info,
//       Warn,
//       Error,
//       Fatal,
// 
//       Count
//   };

  if (boost::iequals(l, "All")) {
    return Level::All;
  } else if (boost::iequals(l, "Finest")) {
    return Level::Finest;
  } else if (boost::iequals(l, "Verbose")) {
    return Level::Verbose;
  } else if (boost::iequals(l, "Finer")) {
    return Level::Finer;
  } else if (boost::iequals(l, "Trace")) {
    return Level::Trace;
  } else if (boost::iequals(l, "Fine")) {
    return Level::Fine;
  } else if (boost::iequals(l, "Debug")) {
    return Level::Debug;
  } else if (boost::iequals(l, "Info")) {
    return Level::Info;
  } else if (boost::iequals(l, "Warn")) {
    return Level::Warn;
  } else if (boost::iequals(l, "Error")) {
    return Level::Error;
  } else if (boost::iequals(l, "Fatal")) {
    return Level::Fatal;
  } else {
    SM_ERROR_STREAM("Invalid logging level " << l << ", setting to Level::Info");
    return Level::Info;
  }

}<commit_msg>Update Levels.cpp<commit_after>#include "sm/logging.hpp"

#include <string>
#include <boost/algorithm/string.hpp> // for case-insensitive string comparison

/**
 * \brief Returns a Level enum from string
 */
sm::logging::Level sm::logging::levels::fromString(const std::string& level) {

  if (boost::iequals(level, "All")) {
    return Level::All;
  } else if (boost::iequals(level, "Finest")) {
    return Level::Finest;
  } else if (boost::iequals(level, "Verbose")) {
    return Level::Verbose;
  } else if (boost::iequals(level, "Finer")) {
    return Level::Finer;
  } else if (boost::iequals(level, "Trace")) {
    return Level::Trace;
  } else if (boost::iequals(level, "Fine")) {
    return Level::Fine;
  } else if (boost::iequals(level, "Debug")) {
    return Level::Debug;
  } else if (boost::iequals(level, "Info")) {
    return Level::Info;
  } else if (boost::iequals(level, "Warn")) {
    return Level::Warn;
  } else if (boost::iequals(level, "Error")) {
    return Level::Error;
  } else if (boost::iequals(level, "Fatal")) {
    return Level::Fatal;
  } else {
    SM_ERROR_STREAM("Invalid logging level " << level << ", setting to Level::Info");
    return Level::Info;
  }

}
{'fraction_non_alphanumeric': 0.18767069840031214, 'fraction_numerical': 0.0, 'mean_word_length': 3.2948073701842544, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 7, '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': '5417194', 'n_tokens_mistral': 906, 'n_tokens_neox': 894, 'n_words': 207}