<commit_before>module Scraper

	def post(url, params)
    HTTP.with_headers("User-Agent" => "INTERNET EXPLORER")
    .post("http://app.toronto.ca/tmmis/#{url}", form: params)
    .body
    .to_s
  end
  
  def get(url)
    HTTP.with_headers("User-Agent" => "INTERNET EXPLORER")
    .get("http://app.toronto.ca/tmmis/#{url}")
  end
  
  def save(file_name, content)
    File.open(file_name, 'w') { |f| f.write (content) }
  end
 
	def raw_file_dir(doc_type)
		case doc_type
		when "agendas" then "lib/dirty_agendas"
		when "votes"	 then "lib/vote_records"
		end
	end

  def deep_clean(string)
    string.scrub.encode('UTF-8', { invalid: :replace, undef: :replace, replace: '�'})
  end

end<commit_msg>changing case statement to use symbols<commit_after>module Scraper

	def post(url, params)
    HTTP.with_headers("User-Agent" => "INTERNET EXPLORER")
    .post("http://app.toronto.ca/tmmis/#{url}", form: params)
    .body
    .to_s
  end
  
  def get(url)
    HTTP.with_headers("User-Agent" => "INTERNET EXPLORER")
    .get("http://app.toronto.ca/tmmis/#{url}")
  end
  
  def save(file_name, content)
    File.open(file_name, 'w') { |f| f.write (content) }
  end
 
	def raw_file_dir(doc_type)
		case doc_type
    when :agendas then "lib/dirty_agendas"
		when :minutes then "lib/dirty_minutes"
		when :votes	 then "lib/vote_records"
		end
	end

  def deep_clean(string)
    string.scrub.encode('UTF-8', { invalid: :replace, undef: :replace, replace: '�'})
  end

end
{'fraction_non_alphanumeric': 0.15416098226466576, 'fraction_numerical': 0.001364256480218281, 'mean_word_length': 3.513846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1918591', 'n_tokens_mistral': 597, 'n_tokens_neox': 570, 'n_words': 118}