<commit_before>#include "scraps/Application.h"

#include "scraps/ArgumentParser.h"
#include "scraps/utility.h"
#include "scraps/loggers.h"

#include <gsl.h>

#include <iostream>

#if SCRAPS_APPLE
#import <Foundation/Foundation.h>
#endif

namespace scraps {

Application* Application::g_instance = nullptr;

Application::Application(Version appVersion) :
    _appVersion{std::move(appVersion)}
{
    SCRAPS_ASSERT(g_instance == nullptr);
    g_instance = this;
}

Application::~Application() {
    g_instance = nullptr;
}

bool Application::processArguments(int argc, const char* argv[]) {
    if (argc == 0) {
        return false;
    }

    _arguments.resize(argc);
    _argv.resize(argc);<commit_msg>add curl init to application class<commit_after>#include "scraps/Application.h"

#include "scraps/curl.h"
#include "scraps/ArgumentParser.h"
#include "scraps/utility.h"
#include "scraps/loggers.h"

#include <gsl.h>

#include <iostream>

#if SCRAPS_APPLE
#import <Foundation/Foundation.h>
#endif

namespace scraps {

Application* Application::g_instance = nullptr;

Application::Application(Version appVersion) :
    _appVersion{std::move(appVersion)}
{
    SCRAPS_ASSERT(g_instance == nullptr);
    g_instance = this;
    InitCURLThreadSafety();
}

Application::~Application() {
    g_instance = nullptr;
}

bool Application::processArguments(int argc, const char* argv[]) {
    if (argc == 0) {
        return false;
    }

    _arguments.resize(argc);
    _argv.resize(argc);
{'fraction_non_alphanumeric': 0.13513513513513514, 'fraction_numerical': 0.0013513513513513514, 'mean_word_length': 4.762645914396887, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4375638', 'n_tokens_mistral': 511, 'n_tokens_neox': 508, 'n_words': 97}