<commit_before><commit_msg>Added module for colorized strings.<commit_after>
------
---- Bash Color Codes
------

local colorBash = {
	black	= "0;30",
	red		= "0;31",
	bred 	= "1;31",
	green	= "0;32",
	yellow	= "1;33",
	blue	= "0;34",
	white 	= "1;37",
	none	= "0"
}

function getColorBash(color)
	color = colorBash[color] or colorBash["none"]
	return "\027[" .. color .. "m"
end

------
---- Colorized String
------

function getColorizedString(str, color)
	return getColorBash(color)  .. str .. getColorBash()
end

function red(str, ...)
	return getColorizedString(str:format(...), "red")
end

function bred(str, ...)
	return getColorizedString(str:format(...), "bred")
end

function yellow(str, ...)
	return getColorizedString(str:format(...), "yellow")
end

function green(str, ...)
	return getColorizedString(str:format(...), "green")
end

function white(str, ...)
	return getColorizedString(str:format(...), "white")
end
{'fraction_non_alphanumeric': 0.21058315334773217, 'fraction_numerical': 0.026997840172786176, 'mean_word_length': 3.521951219512195, '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': '3588209', 'n_tokens_mistral': 361, 'n_tokens_neox': 340, 'n_words': 77}