<commit_before>
parsed_subjects_array = []

File.read("./db/data/raw_data.csv").split("\n").each do |subject|
  first_name = subject.split(",")[1].strip
  last_name = subject.split(",")[0].strip
  parsed_subjects_array << "#{first_name} #{last_name}"
end

parsed_subjects_array.collect do |subject|
  subject.gsub!(/ë/, 'e').gsub!(/ö/, 'o').gsub!(/ğ/, 'g').gsub!(/Ö/, 'O')
end<commit_msg>build seed.rb<commit_after>parsed_subjects_array = []

File.read("./db/data/raw_data.csv").split("\n").each do |subject|
  first_name = subject.split(",")[1].strip
  last_name = subject.split(",")[0].strip
  parsed_subjects_array << "#{first_name} #{last_name}"
end

sanitized_subjects = []

parsed_subjects_array.each do |subject|
  subject.gsub!(/ë/, 'e')
  subject.gsub!(/ö/, 'o')
  subject.gsub!(/ğ/, 'g')
  subject.gsub!(/Ö/, 'O')
  sanitized_subjects << subject
end

sanitized_subjects.each do |subject|
  Subject.create(name: subject)
end
{'fraction_non_alphanumeric': 0.21543408360128619, 'fraction_numerical': 0.004287245444801715, 'mean_word_length': 5.025806451612903, 'pattern_counts': {'":': 0, '<': 9, '<?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': '4346966', 'n_tokens_mistral': 363, 'n_tokens_neox': 368, 'n_words': 55}