<commit_before>#ifndef SK_ENV_H
#define SK_ENV_H

#include "api/sk_core.h"

// per-thread data and macros, most of time, normally you only need to use these macros
#define SK_ENV            (sk_thread_env())
#define SK_ENV_CORE       (sk_thread_env()->core)

#define SK_ENV_WORKFLOWS  (sk_thread_env()->core->workflows)
#define SK_ENV_LOGGER     (sk_thread_env()->core->logger)
#define SK_ENV_SCHED      (sk_thread_env()->engine->sched)
#define SK_ENV_ENTITY_MGR (sk_thread_env()->engine->entity_mgr)
#define SK_ENV_EVENTLOOP  (sk_thread_env()->engine->evlp)
#define SK_ENV_MON        (sk_thread_env()->engine->mon)

#define SK_ENV_NAME_LEN 20

typedef struct sk_thread_env_t {
    // ======== public  ========
    sk_core_t*   core;
    sk_engine_t* engine;

    // used for logging or debugging
    char name[SK_ENV_NAME_LEN];
    int  idx;
} sk_thread_env_t;

void sk_thread_env_init();
void sk_thread_env_set(sk_thread_env_t* env);
sk_thread_env_t* sk_thread_env();
sk_thread_env_t* sk_thread_env_create(sk_core_t* core, sk_engine_t* engine,
                                      const char* name, int idx);

#endif<commit_msg>fix typos<commit_after>#ifndef SK_ENV_H
#define SK_ENV_H

#include "api/sk_core.h"

// per-thread data and macros, most of time, you only need to use these macros
#define SK_ENV            (sk_thread_env())
#define SK_ENV_CORE       (sk_thread_env()->core)

#define SK_ENV_WORKFLOWS  (sk_thread_env()->core->workflows)
#define SK_ENV_LOGGER     (sk_thread_env()->core->logger)
#define SK_ENV_SCHED      (sk_thread_env()->engine->sched)
#define SK_ENV_ENTITY_MGR (sk_thread_env()->engine->entity_mgr)
#define SK_ENV_EVENTLOOP  (sk_thread_env()->engine->evlp)
#define SK_ENV_MON        (sk_thread_env()->engine->mon)

#define SK_ENV_NAME_LEN 20

typedef struct sk_thread_env_t {
    // ======== public  ========
    sk_core_t*   core;
    sk_engine_t* engine;

    // used for logging or debugging
    char name[SK_ENV_NAME_LEN];
    int  idx;
} sk_thread_env_t;

void sk_thread_env_init();
void sk_thread_env_set(sk_thread_env_t* env);
sk_thread_env_t* sk_thread_env();
sk_thread_env_t* sk_thread_env_create(sk_core_t* core, sk_engine_t* engine,
                                      const char* name, int idx);

#endif
{'fraction_non_alphanumeric': 0.1200533570475767, 'fraction_numerical': 0.0017785682525566918, 'mean_word_length': 4.07900677200903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7344129', 'n_tokens_mistral': 844, 'n_tokens_neox': 823, 'n_words': 167}