<commit_before><commit_msg>Data migration to remove !!1 from body copy<commit_after>def remove_first_image_from_body(edition)
  new_body = edition.body.gsub(/^!!1[^\d]/, '')
  edition.update_attribute(:body, new_body)
end

NewsArticle.find_each { |article| remove_first_image_from_body(article) }
CaseStudy.find_each { |study| remove_first_image_from_body(study) }
{'fraction_non_alphanumeric': 0.12637362637362637, 'fraction_numerical': 0.005494505494505495, 'mean_word_length': 8.35897435897436, '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': '5715636', 'n_tokens_mistral': 129, 'n_tokens_neox': 125, 'n_words': 20}