<commit_before><?php

namespace Parvula\Core;

use Parvula\Core\FilesSystem as Files;
use Parvula\Core\Exception\IOException;

/**
 * Parvula
 *
 * @package Parvula
 * @version 0.5.0
 * @since 0.1.0
 * @author <NAME>
 * @license MIT License
 */
class Parvula {

	/**
	 * Get current URI (without /index.php)
	 *
	 * @return string
	 */
	public static function getURI() {
		//TODO stock URI in field (same for relativeURI)
		$scriptName = $_SERVER['SCRIPT_NAME'];

		if(Config::get('URLRewriting')) {
			$scriptName = dirname($scriptName);
		}

		return implode(explode($scriptName, $_SERVER['REQUEST_URI'], 2));
	}

	/**
	 * Get relative URI from the root
	 *
	 * @return string
	 */
	public static function getRelativeURIToRoot() {
		$postUrl = static::getURI();
<commit_msg>parse_url to remove queries<commit_after><?php

namespace Parvula\Core;

use Parvula\Core\FilesSystem as Files;
use Parvula\Core\Exception\IOException;

/**
 * Parvula
 *
 * @package Parvula
 * @version 0.5.0
 * @since 0.1.0
 * @author <NAME>
 * @license MIT License
 */
class Parvula {

	/**
	 * Get current URI (without /index.php)
	 *
	 * @return string
	 */
	public static function getURI() {
		//TODO stock URI in field (same for relativeURI)
		$scriptName = $_SERVER['SCRIPT_NAME'];
		$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);

		if(Config::get('URLRewriting')) {
			$scriptName = dirname($scriptName);
		}

		return implode(explode($scriptName, $uri, 2));
	}

	/**
	 * Get relative URI from the root
	 *
	 * @return string
	 */
	public static function getRelativeURIToRoot() {
		$postUrl = static::getURI();

{'fraction_non_alphanumeric': 0.14757160647571607, 'fraction_numerical': 0.008717310087173101, 'mean_word_length': 3.7544378698224854, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1324748', 'n_tokens_mistral': 594, 'n_tokens_neox': 546, 'n_words': 136}