<commit_before>
module pig_latin_translator
	def self.pig_latin( user_input )
		pig_latinized_words = user_input.split( ' ' ).map do |word|
			front, back, vwl = "","","aeiou"
			( front = $&; word.sub!( /\A\W+/, "" ); ) if /\A\W+/ === word
			( back = $&; word.sub!( /\W+\z/, "" ); ) if /\W+\z/ === word
			case word
			when /\A[#{vwl}]/i
				word + 'ay'
			when /\A[^#{vwl}]/i
				word = word.sub( /\Ay|\Aqu|\A[^#{vwl}yq]+/i, "" ) + $& + "ay"
			end
				word = front + word + back
			end
		pig_latinized_words = pig_latinized_words.join( " " )
		return pig_latinized_words
	end
end<commit_msg>trying to get it to work with sinatra<commit_after>
module pig_latin_translator
	def pig_latin( user_input )
		pig_latinized_words = user_input.split( ' ' ).map do |word|
			front, back, vwl = "","","aeiou"
			( front = $&; word.sub!( /\A\W+/, "" ); ) if /\A\W+/ === word
			( back = $&; word.sub!( /\W+\z/, "" ); ) if /\W+\z/ === word
			case word
			when /\A[#{vwl}]/i
				word + 'ay'
			when /\A[^#{vwl}]/i
				word = word.sub( /\Ay|\Aqu|\A[^#{vwl}yq]+/i, "" ) + $& + "ay"
			end
				word = front + word + back
			end
		pig_latinized_words = pig_latinized_words.join( " " )
		return pig_latinized_words
	end
end
{'fraction_non_alphanumeric': 0.22415219189412738, 'fraction_numerical': 0.0, 'mean_word_length': 2.6778115501519757, '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': '2520356', 'n_tokens_mistral': 593, 'n_tokens_neox': 520, 'n_words': 108}