<commit_before>#include "UnrealEnginePythonPrivatePCH.h"
#include "PyCommandlet.h"

#include "Regex.h"

UPyCommandlet::UPyCommandlet(const FObjectInitializer& ObjectInitializer) 
	: Super(ObjectInitializer)
{
	LogToConsole = 1;
}

int32 UPyCommandlet::Main(const FString& CommandLine)
{
	TArray<FString> Tokens, Switches;
	TMap<FString, FString> Params;
	ParseCommandLine(*CommandLine, Tokens, Switches, Params);<commit_msg>correctly acquire the gil in commandlet<commit_after>#include "UnrealEnginePythonPrivatePCH.h"
#include "PyCommandlet.h"

#include "Regex.h"

UPyCommandlet::UPyCommandlet(const FObjectInitializer& ObjectInitializer) 
	: Super(ObjectInitializer)
{
	LogToConsole = 1;
}

int32 UPyCommandlet::Main(const FString& CommandLine)
{
	FScopePythonGIL gil;

	TArray<FString> Tokens, Switches;
	TMap<FString, FString> Params;
	ParseCommandLine(*CommandLine, Tokens, Switches, Params);
{'fraction_non_alphanumeric': 0.10813823857302118, 'fraction_numerical': 0.006688963210702341, 'mean_word_length': 8.553191489361701, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7144126', 'n_tokens_mistral': 327, 'n_tokens_neox': 316, 'n_words': 58}