<commit_before><?php
// Register special autoloader
spl_autoload_register(function($class){

    // Define classmap
    $classmap = array(
        'ToolkitApi\Toolkit'            => __DIR__ . DIRECTORY_SEPARATOR . 'Toolkit.php',
        'ToolkitApi\db2supp'            => __DIR__ . DIRECTORY_SEPARATOR . 'Db2supp.php',
        'ToolkitApi\httpsupp'           => __DIR__ . DIRECTORY_SEPARATOR . 'httpsupp.php',
        'ToolkitApi\DateTimeApi'        => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\ListFromApi'        => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\UserSpace'          => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\TmpUserSpace'       => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\DataQueue'          => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\SpooledFiles'       => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\JobLogs'            => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\ObjectLists'        => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\SystemValues'       => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\DataArea'           => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\odbcsupp'           => __DIR__ . DIRECTORY_SEPARATOR . 'Odbcsupp.php',
        'ToolkitApi\ToolkitPcml'        => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitPCML.php',
        'ToolkitApi\ProgramParameter'   => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\DataStructure'      => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\CharParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\ZonedParam'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\PackedDecParam'     => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\Int32Param'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\SizeParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\SizePackParam'      => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\Int64Param'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\UInt32Param'        => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\UInt64Param'        => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\FloatParam'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\RealParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\HoleParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\BinParam'           => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\XMLWrapper'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceXML.php',
    );

    $file = $classmap[$class];
    if (is_readable($file)) {
        require_once $file;
        return;
    } else {
        throw new Exception("File Not Found");
    }
});<commit_msg>Improved error handling in autoload classmap<commit_after><?php
// Register special autoloader
spl_autoload_register(function($class){

    // Define classmap
    $classmap = array(
        'ToolkitApi\Toolkit'            => __DIR__ . DIRECTORY_SEPARATOR . 'Toolkit.php',
        'ToolkitApi\db2supp'            => __DIR__ . DIRECTORY_SEPARATOR . 'Db2supp.php',
        'ToolkitApi\httpsupp'           => __DIR__ . DIRECTORY_SEPARATOR . 'httpsupp.php',
        'ToolkitApi\DateTimeApi'        => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\ListFromApi'        => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\UserSpace'          => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\TmpUserSpace'       => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\DataQueue'          => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\SpooledFiles'       => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\JobLogs'            => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\ObjectLists'        => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\SystemValues'       => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\DataArea'           => __DIR__ . DIRECTORY_SEPARATOR . 'iToolkitService.php',
        'ToolkitApi\odbcsupp'           => __DIR__ . DIRECTORY_SEPARATOR . 'Odbcsupp.php',
        'ToolkitApi\ToolkitPcml'        => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitPCML.php',
        'ToolkitApi\ProgramParameter'   => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\DataStructure'      => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\CharParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\ZonedParam'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\PackedDecParam'     => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\Int32Param'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\SizeParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\SizePackParam'      => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\Int64Param'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\UInt32Param'        => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\UInt64Param'        => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\FloatParam'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\RealParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\HoleParam'          => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\BinParam'           => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceParameter.php',
        'ToolkitApi\XMLWrapper'         => __DIR__ . DIRECTORY_SEPARATOR . 'ToolkitServiceXML.php',
    );

    if (!in_array($class,$classmap))
    {
        throw new Exception("Class $class isn't defined in classmap");
    }

    $file = $classmap[$class];
    if (!is_readable($file)) {
        throw new Exception("File $file Not Found");
    }

    require_once $file;
    return;
});
{'fraction_non_alphanumeric': 0.11208728921638089, 'fraction_numerical': 0.0028340654669122855, 'mean_word_length': 2.778372591006424, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 65, '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': '4190771', 'n_tokens_mistral': 2276, 'n_tokens_neox': 2195, 'n_words': 307}