<commit_before><?php
include '..\Classes\node.php';

class nodeExtract {

	public function __construct()
	{
	}
	
	public static function return_nodes($array)
	{
		$array = $array["r"];
		
		if (isset($array["values"]))
		{
			$retArray = Array();
			foreach( $array["values"] as $i)
			{
				array_push($retArray, new node($i));
			}
			echo "1";
			return $retArray;
		}
		else if (isset($array["nodes"]))
		{
			$retArray = Array();
			
			for($i = 0; $i <= strlen($array["nodes"]); $i += 26)
			{
				array_push($retArray, substr($array["nodes"], $i, 26));
			}
			echo "2";
			return $retArray;
		}
		else
		{
			echo "3";
			return FALSE;
		}
	}

}


?><commit_msg>debugged and cleaned up nodeExtract.php<commit_after><?php
include_once '..\Classes\node.php';

class nodeExtract {

	public function __construct()
	{
	}
	
	public static function return_nodes($array)
	{
		$array = $array["r"];
		
		if (isset($array["values"]))
		{
			$retArray = Array();
			foreach( $array["values"] as $i)
			{
				array_push($retArray, new node($i));
			}

			return $retArray;
		}
		else if (isset($array["nodes"]))
		{
			$retArray = Array();
			
			for($i = 0; $i <= strlen($array["nodes"]) -1; $i += 26)
			{
				array_push($retArray, new DHT_node(substr($array["nodes"], $i, 26)));
			}

			return $retArray;
		}
		else
		{

			return FALSE;
		}
	}

}


?>
{'fraction_non_alphanumeric': 0.19748520710059173, 'fraction_numerical': 0.010355029585798817, 'mean_word_length': 3.0148367952522257, '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': '1753386', 'n_tokens_mistral': 620, 'n_tokens_neox': 507, 'n_words': 106}