<commit_before><?php

namespace NDN;

error_reporting(E_ALL);

try {

    if (!defined('ROOT_PATH')) {

        if (isset($_SERVER['DOCUMENT_ROOT'])) {
            // This is defined BY APACHE. It doesn't appear in IIS or anything
            define('ROOT_PATH', dirname($_SERVER['DOCUMENT_ROOT']));
        } else {
            // This is the default. It is not install specific unfortunately
            define('ROOT_PATH', dirname(dirname(__FILE__)));
        }
    }

    $app     = ROOT_PATH . '/app/';
    $library = ROOT_PATH . '/app/library/';

    // Creates the autoloader
    $loader = new \Phalcon\Loader();

    // Register some classes
    $loader->registerNamespaces(
        array("NDN" => $library . "NDN/")
    );
    $loader->register();

    echo Bootstrap::run(array());

} catch (\Phalcon\Exception $e) {
    Error::exception($e);
    header('Location: /');
}<commit_msg>Reworked the entry point to use the bootstrap file 	modified:   public/index.php<commit_after><?php

error_reporting(E_ALL);

try {

    if (!defined('ROOT_PATH')) {
        define('ROOT_PATH', dirname(dirname(__FILE__)));
    }

    // Using require once because I want to get the specific
    // bootloader class here. The loader will be initialized
    // in my bootstrap class
    require_once ROOT_PATH . '/app/library/NDN/Bootstrap.php';
    require_once ROOT_PATH . '/app/library/NDN/Error.php';

    $di  = new \Phalcon\DI\FactoryDefault();
    $app = new \NDN\Bootstrap($di);

    echo $app->run(array());

} catch (\Phalcon\Exception $e) {
    echo $e->getMessage();
    //\NDN\Error::exception($e);
    //header('Location: /');
}
{'fraction_non_alphanumeric': 0.15554194733619106, 'fraction_numerical': 0.0, 'mean_word_length': 2.722095671981777, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '7102217', 'n_tokens_mistral': 527, 'n_tokens_neox': 509, 'n_words': 123}