<commit_before><?php
/**
 * Class AutoLoader
 * @file    AutoLoader.php
 *
 * PHP version 5.3.9+
 *
 * @author  <NAME> <<EMAIL>>
 * @date    Fri Jun 01 10:19:04 2012
 * @copyright The BSD 3-Clause License
 */

namespace Veles;

/**
 * Class AutoLoader
 *
 * @author  <NAME> <<EMAIL>>
 */
class AutoLoader
{
	/**
	 * Initialisation
	 */
	final public static function init()
	{
		spl_autoload_register(__NAMESPACE__ . '\AutoLoader::load');
	}

	/**
	 * AutoLoader
	 *
	 * @param string $name
	 */
	final public static function load($name)
	{
		$name = str_replace('\\', DIRECTORY_SEPARATOR, $name);

		// For using external libs with their own autoloaders
		// do not use strict require function
		include "$name.php";
	}
}<commit_msg>Implement Autoloader in PSR-0 standard<commit_after><?php
/**
 * Class AutoLoader
 * @file    AutoLoader.php
 *
 * PHP version 5.3.9+
 *
 * @author  <NAME> <<EMAIL>>
 * @date    Fri Jun 01 10:19:04 2012
 * @copyright The BSD 3-Clause License
 */

namespace Veles;

/**
 * Class AutoLoader
 *
 * @author  <NAME> <<EMAIL>>
 */
class AutoLoader
{
	/**
	 * Initialisation
	 */
	final public static function init()
	{
		spl_autoload_register(__NAMESPACE__ . '\AutoLoader::load');
	}

	/**
	 * AutoLoader
	 *
	 * @param string $class_name
	 */
	final public static function load($class_name)
	{
		$class_name = ltrim($class_name, '\\');
		$namespace = $file_name = '';
		if ($last_ns_pos = strrpos($class_name, '\\')) {
			$namespace = substr($class_name, 0, $last_ns_pos);
			$class_name = substr($class_name, $last_ns_pos + 1);
			$file_name  = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
		}
		$file_name = stream_resolve_include_path(
			$file_name . str_replace('_', DIRECTORY_SEPARATOR, $class_name) . '.php'
		);

		if ($file_name) {
			include $file_name;
		}
	}
}
{'fraction_non_alphanumeric': 0.15527610716238383, 'fraction_numerical': 0.01913613996719519, 'mean_word_length': 3.430992736077482, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, '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': '1145836', 'n_tokens_mistral': 718, 'n_tokens_neox': 651, 'n_words': 151}