<commit_before><?php

class EntityDescriptor {

	protected $fields = array();
	protected $indexes = array();
	
	const DESCRIPTORCLASS='EntityDescriptor';
	
	public function __construct($name) {
		$descriptorPath = ENTITY_DESCRIPTOR_CONFIG_PATH.$name;
		$cache = new FSCache(self::DESCRIPTORCLASS, $name, filemtime(YAML::getFilePath($descriptorPath)));
		if( !$cache->get($conf) ) {
			$conf = YAML::build($descriptorPath, true);
			// Build descriptor
			
			//    Parse Config file
			
			
			//    Generate cache output
			
			// Save descriptor
			$cache->set($conf = empty($conf) ? false : $conf->all);
		}
		
// 		return $conf;
	}
	
	protected static $types = array();
	public static function registerType($name, $argsParser) {


		static::$types[$name] = array(
			'argsParser'	=> $argsParser
		);<commit_msg>Doing something with entity descriptors.<commit_after><?php

class EntityDescriptor {

	protected $fields = array();
	protected $indexes = array();
	
	const DESCRIPTORCLASS='EntityDescriptor';
	
	public function __construct($name) {
		$descriptorPath = ENTITY_DESCRIPTOR_CONFIG_PATH.$name;
		$cache = new FSCache(self::DESCRIPTORCLASS, $name, filemtime(YAML::getFilePath($descriptorPath)));
		if( !$cache->get($conf) ) {
			$conf = YAML::build($descriptorPath, true);
			// Build descriptor
			
			//    Parse Config file
			
			
			//    Generate cache output
			
			// Save descriptor
			$cache->set($conf = empty($conf) ? false : $conf->all);
		}
		
// 		return $conf;
	}
	
	protected static $types = array();
	public static function registerType($name, $argsParser) {
		
		
		static::$types[$name] = array(
			'argsParser'	=> $argsParser
		);
	}
	
	public static function parseType($string) {
		
{'fraction_non_alphanumeric': 0.14469078179696615, 'fraction_numerical': 0.0, 'mean_word_length': 3.7506925207756234, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '5002874', 'n_tokens_mistral': 622, 'n_tokens_neox': 522, 'n_words': 118}