<commit_before>const SpecifiCalc = (function () {
	const stripSelectors = (str) => {
			const selectorPatterns = /[>~+]/g,
				sequentialSpaces = /\s+/g;
		
			let tmpSelectors = str.replace(selectorPatterns, " ");
			
			tmpSelectors = tmpSelectors.replace(sequentialSpaces, " ");
		
			return tmpSelectors;	
		},
		
		countIds = (selector_array) => {			
			const idPattern = /#.+/;
		
			let count = 0;
		
			selector_array.forEach((i) => {
				if (idPattern.test(i)) {
					//console.log('selector: ', i);
					count += 1;
				}
			});
		
			//console.log('universal selectors: ', count, selectors, this.state.count);
		
			return count;
		},
		
		countClassesAndPseudos = (selector_array) => {			
			const classPattern = /\..+/;
			const pseudoPattern = /:.+/;
		
			let count = 0;
		
			selector_array.forEach((i) => {
				if (classPattern.test(i) || pseudoPattern.test(i)) {
					//console.log('selector: ', i);
					count += 1;
				}
			});
		
			//console.log('universal selectors: ', count, selectors, this.state.count);
		
			return count;
		},
		
		countElements = (selector_array) => {			
			const elementsPattern = /^[^\.#:]/;
		
			let count = 0;
		
			selector_array.forEach((i) => {
				if (elementsPattern.test(i)) {
					//console.log('selector: ', i);
					count += 1;
				}
			});
		
			//console.log('universal selectors: ', count, selectors, this.state.count);<commit_msg>Issue 4 (#7)<commit_after>const SpecifiCalc = (function () {
	const stripSelectors = (str) => {
			const selectorPatterns = /[>~+]/g,
				sequentialSpaces = /\s+/g;
		
			let tmpSelectors = str.replace(selectorPatterns, " ");
			
			tmpSelectors = tmpSelectors.replace(sequentialSpaces, " ");
		
			return tmpSelectors;	
		},
		
		countIds = (selector_array) => {			
			const idPattern = /#.+/;
		
			let count = 0;
		
			selector_array.forEach((i) => {
				if (idPattern.test(i)) {
					//console.log('selector: ', i);
					count += 1;
				}
			});
		
			//console.log('universal selectors: ', count, selectors, this.state.count);
		
			return count;
		},
		
		countClassesAndPseudos = (selector_array) => {			
			const classPattern = /\..+/;
			const pseudoPattern = /:.+/;
		
			let count = 0;
		
			selector_array.forEach((i) => {
				if (classPattern.test(i) || pseudoPattern.test(i)) {
					//console.log('selector: ', i);
					count += 1;
				}
			});
		
			//console.log('universal selectors: ', count, selectors, this.state.count);
		
			return count;
		},
		
		countElements = (selector_array) => {			
			const elementsPattern = /^[^\.#:\*]/;
		
			let count = 0;
		
			selector_array.forEach((i) => {
				if (elementsPattern.test(i)) {
					//console.log('selector: ', i);
					count += 1;
				}
			});
		
			//console.log('universal selectors: ', count, selectors, this.state.count);
{'fraction_non_alphanumeric': 0.1803513804230907, 'fraction_numerical': 0.005019720329867336, 'mean_word_length': 2.513853904282116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '7170257', 'n_tokens_mistral': 1249, 'n_tokens_neox': 926, 'n_words': 165}