<commit_before>#!/usr/bin/env pwsh
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)
[Console]::TreatControlCAsInput = $true

$action = {
	if ($EventArgs.Name -notlike "*.g.php") {
		$changeType = [String] $EventArgs.ChangeType
		Write-Host "'$($EventArgs.Name)' was $($changeType.ToLower()): starting a new build..."
		$timeSpan = Measure-Command { tool/build.ps1 | Out-Host }
		Write-Host "> Finished the build after $($timeSpan.TotalSeconds) seconds."
	}
}

$watcher = New-Object System.IO.FileSystemWatcher (Resolve-Path src).Path
$watcher.EnableRaisingEvents = $true
$watcher.IncludeSubdirectories = $true

foreach ($event in "Changed", "Created", "Deleted", "Renamed") {
	Register-ObjectEvent $watcher $event -Action $action | Out-Null
}

$console = $Host.UI.RawUI;
while ($true) {
	if ($console.KeyAvailable -and ($console.ReadKey("AllowCtrlC,IncludeKeyUp,NoEcho").Character -eq 3)) { break }
	Start-Sleep -Milliseconds 200
}
<commit_msg>Updated the "watch" task<commit_after>#!/usr/bin/env pwsh
Set-StrictMode -Version Latest
Set-Location (Split-Path $PSScriptRoot)
[Console]::TreatControlCAsInput = $true

$action = {
	if ($EventArgs.Name -notlike "*.g.php") {
		$changeType = [String] $EventArgs.ChangeType
		Write-Host "'$($EventArgs.Name)' was $($changeType.ToLower()): starting a new build..."
		$timeSpan = Measure-Command { tool/build.ps1 2>&1 | Out-Host }
		Write-Host "> Finished the build after $($timeSpan.TotalSeconds) seconds."
	}
}

$watcher = New-Object System.IO.FileSystemWatcher (Resolve-Path src).Path
$watcher.EnableRaisingEvents = $true
$watcher.IncludeSubdirectories = $true

foreach ($event in "Changed", "Created", "Deleted", "Renamed") {
	Register-ObjectEvent $watcher $event -Action $action | Out-Null
}

$console = $Host.UI.RawUI;
while ($true) {
	if ($console.KeyAvailable -and ($console.ReadKey("AllowCtrlC,IncludeKeyUp,NoEcho").Character -eq 3)) { break }
	Start-Sleep -Milliseconds 200
}

{'fraction_non_alphanumeric': 0.16119096509240247, 'fraction_numerical': 0.006160164271047228, 'mean_word_length': 5.109717868338558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '1403701', 'n_tokens_mistral': 684, 'n_tokens_neox': 654, 'n_words': 150}