<commit_before>import re
import sys
from collections import Counter

def type_classifier(words):
	'''
	Input: list of strings, ie words
	Process this list using regex expressions to figure out what data type they represent.
	Possible data types:
	1. Date
	2. Time
	3. Currency value
	4. Telephone number
	5. Zipcode
	6. Float
	7. Integer
	8. String
	'''
	results = []
	for word in words:
		
		###### Date
		date1 = re.match(r'[0-9]{2}(\/|-|\.)[0-9]{2}(\/|-|\.)([0-9]{2}){1,2}\b', word)
		date2 = re.match(r'[0-9]{0,2}(th|rd|st)?( )?((J|j)(an(uary)?)|((F|f)(eb(ruary)?))|((M|m)(ar(ch)?))|((A|a)(pr(il)?))|((M|m)(ay))|((J|j)(un(e)?))|((J|j)(ul(y)?))|((A|a)(ug(ust)?))|((S|s)(ep(tember)?))|((O|o)(ct(ober)?))|((N|n)(ov(ember)?))|((D|d)(ec(ember)?)))', word)
		if date1 or date2:
			results.append('date')
			continue

		###### Time
		time1 = re.match(r'[0-9]{2}(:)[0-9]{2}( (hours|hrs))?\b', word)
		time2 = re.match(r'[0-9]?(:)[0-9]{2}(( )?(PM|pm|AM|am))?\b', word)
		if time1 or time2:
			results.append('time')
			continue

		###### Currency
		curr = re.match(r'\$?[0-9]+(,[0-9]{3})*\.[0-9]{2}$', word)
		if curr:
			results.append('currency')
			continue

		###### Telephone
		tele = re.match(r'(\()?[0-9]{3}((\)( )?)?|-)[0-9]{3}( |-)[0-9]{4}\b', word)
		if tele:<commit_msg>lol jk we removed the currency detection with  '$'<commit_after>import re
import sys
from collections import Counter

def type_classifier(words):
	'''
	Input: list of strings, ie words
	Process this list using regex expressions to figure out what data type they represent.
	Possible data types:
	1. Date
	2. Time
	3. Currency value
	4. Telephone number
	5. Zipcode
	6. Float
	7. Integer
	8. String
	'''
	results = []
	for word in words:
		
		###### Date
		date1 = re.match(r'[0-9]{2}(\/|-|\.)[0-9]{2}(\/|-|\.)([0-9]{2}){1,2}\b', word)
		date2 = re.match(r'[0-9]{0,2}(th|rd|st)?( )?((J|j)(an(uary)?)|((F|f)(eb(ruary)?))|((M|m)(ar(ch)?))|((A|a)(pr(il)?))|((M|m)(ay))|((J|j)(un(e)?))|((J|j)(ul(y)?))|((A|a)(ug(ust)?))|((S|s)(ep(tember)?))|((O|o)(ct(ober)?))|((N|n)(ov(ember)?))|((D|d)(ec(ember)?)))', word)
		if date1 or date2:
			results.append('date')
			continue

		###### Time
		time1 = re.match(r'[0-9]{2}(:)[0-9]{2}( (hours|hrs))?\b', word)
		time2 = re.match(r'[0-9]?(:)[0-9]{2}(( )?(PM|pm|AM|am))?\b', word)
		if time1 or time2:
			results.append('time')
			continue

		###### Currency
		curr = re.match(r'[0-9]+(,[0-9]{3})*\.[0-9]{2}$', word)
		if curr:
			results.append('currency')
			continue

		###### Telephone
		tele = re.match(r'(\()?[0-9]{3}((\)( )?)?|-)[0-9]{3}( |-)[0-9]{4}\b', word)
		if tele:
{'fraction_non_alphanumeric': 0.308584686774942, 'fraction_numerical': 0.04563031709203403, 'mean_word_length': 4.400835073068894, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4966823', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1158, 'n_words': 209}