<commit_before><?php
class Abp01_Autoloader {
    private static $_libDir;

    private static $_initialized = false;

    private static $_prefix = 'Abp01_';

    public static function init($libDir) {
        if (!self::$_initialized) {
            spl_autoload_register(array(__CLASS__, 'autoload'));
            self::$_libDir = $libDir;
            self::$_initialized = true;
        }
    }

    private static function autoload($className) {
        $classPath = null;
        if (strpos($className, self::$_prefix) === 0) {
            $classPath = str_replace(self::$_prefix, '', $className);
            $classPath = self::_getRelativePath($classPath);
            $classPath = self::$_libDir . '/' . $classPath . '.php';
            if ($className == 'Abp01_Route_Track_GPXDocumentParser') {
                var_dump($classPath);
                var_dump(file_exists($classPath));
            }
        } else {
            $classPath = self::$_libDir . '/3rdParty/' . $className . '.php';
        }
        if (!empty($classPath) && file_exists($classPath)) {
            require_once $classPath;
        }
    }

    private static function _getRelativePath($className) {
        $classPath = array();
        $pathParts = explode('_', $className);
        $className = array_pop($pathParts);
        foreach($pathParts as $namePart) {
            $namePart[0] = strtolower($namePart[0]);
            $classPath[] = $namePart;
        }
        $classPath[] = $className;
        return implode('/', $classPath);
    }
}<commit_msg>Fixed  #11 + comm. on Spherical Mercator proj class<commit_after><?php
class Abp01_Autoloader {
    private static $_libDir;

    private static $_initialized = false;

    private static $_prefix = 'Abp01_';

    public static function init($libDir) {
        if (!self::$_initialized) {
            spl_autoload_register(array(__CLASS__, 'autoload'));
            self::$_libDir = $libDir;
            self::$_initialized = true;
        }
    }

    private static function autoload($className) {
        $classPath = null;
        if (strpos($className, self::$_prefix) === 0) {
            $classPath = str_replace(self::$_prefix, '', $className);
            $classPath = self::_getRelativePath($classPath);
            $classPath = self::$_libDir . '/' . $classPath . '.php';
        } else {
            $classPath = self::$_libDir . '/3rdParty/' . $className . '.php';
        }
        if (!empty($classPath) && file_exists($classPath)) {
            require_once $classPath;
        }
    }

    private static function _getRelativePath($className) {
        $classPath = array();
        $pathParts = explode('_', $className);
        $className = array_pop($pathParts);
        foreach($pathParts as $namePart) {
            $namePart[0] = strtolower($namePart[0]);
            $classPath[] = $namePart;
        }
        $classPath[] = $className;
        return implode('/', $classPath);
    }
}
{'fraction_non_alphanumeric': 0.14479025710419485, 'fraction_numerical': 0.006765899864682003, 'mean_word_length': 2.274640088593577, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '3664625', 'n_tokens_mistral': 868, 'n_tokens_neox': 853, 'n_words': 170}