<commit_before>Document.record_timestamps = false
documents = Document.where("body like '%whitehall.preview.alphagov.co.uk/admin%'")
documents.each do |document|
  fixed_body = document.body.gsub(/whitehall\.preview\.alphagov\.co\.uk\/admin/, "whitehall.preview.alphagov.co.uk/#{Whitehall.router_prefix}/admin")
  document.update_attribute(:body, fixed_body)
  puts "Updated document #{document.id}"
end<commit_msg>Gah, OK, we didn't need this slash.<commit_after>Document.record_timestamps = false
documents = Document.where("body like '%whitehall.preview.alphagov.co.uk/admin%'")
documents.each do |document|
  fixed_body = document.body.gsub(/whitehall\.preview\.alphagov\.co\.uk\/admin/, "whitehall.preview.alphagov.co.uk#{Whitehall.router_prefix}/admin")
  document.update_attribute(:body, fixed_body)
  puts "Updated document #{document.id}"
end
{'fraction_non_alphanumeric': 0.15393654524089306, 'fraction_numerical': 0.0, 'mean_word_length': 5.926829268292683, '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': '6677443', 'n_tokens_mistral': 286, 'n_tokens_neox': 274, 'n_words': 43}