<commit_before>class EncoderFormat {
public:
  std::string get() { return std::string(_format.begin(), _format.end()); } const
  void set(const std::wstring fileName)
  {
    std::wstring format=fileName;

    size_t index = format.find(L"_", 0);
    if (index != std::wstring::npos) {
      format=format.substr(index + 1);
      index = format.find(L"_", 0);
      if (index != std::wstring::npos) {
        _format=format.substr(0, index);
        return;
      }
    }

    throw std::invalid_argument("fileName");
  }<commit_msg>Should not throw exception...<commit_after>class EncoderFormat {
public:
  std::string get() { return std::string(_format.begin(), _format.end()); } const
  void set(const std::wstring fileName)
  {
    std::wstring format=fileName;

    size_t index = format.find(L"_", 0);
    if (index == std::wstring::npos)
      return;

    format=format.substr(index + 1);
    index = format.find(L"_", 0);
    if (index != std::wstring::npos)
      _format=format.substr(0, index);
  }
{'fraction_non_alphanumeric': 0.1681503461918892, 'fraction_numerical': 0.00791295746785361, 'mean_word_length': 3.497777777777778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7365875', 'n_tokens_mistral': 346, 'n_tokens_neox': 335, 'n_words': 71}