<commit_before><?php

$name = array_shift($argv);
$usage = function() use($name) {
	echo <<<TXT
Usage: $name <unit-test-file>

Execute the class definition in a file as a unit test.

TXT
	;
};

$test_file = array_shift($argv);
if($test_file === null) {
	call_user_func($usage);
	exit(1);
}
array_unshift($argv, $test_file);
<commit_msg>Make standalone unit test driver.<commit_after>#!/usr/bin/env php
<?php

require dirname(__DIR__) . '/cli.php';

$name = basename(array_shift($argv));
$usage = function() use($name) {
	echo <<<TXT
Usage: $name <unit-test-file>

Execute the class definition in a file as a unit test.

TXT
	;
};

$test_file = array_shift($argv);
if($test_file === null) {
	call_user_func($usage);
	exit(1);
}
array_unshift($argv, $test_file);

{'fraction_non_alphanumeric': 0.17608409986859397, 'fraction_numerical': 0.002628120893561104, 'mean_word_length': 5.297520661157025, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 5, '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': '5475842', 'n_tokens_mistral': 291, 'n_tokens_neox': 288, 'n_words': 71}