<commit_before>rules_data = [{:text => '\*\*\*+\n<NAME>.*',
                  :replacement => '',
                  :regexp => true,
                  :info_request => InfoRequest.find_by_url_name('total_number_of_objects_in_the_n_6')
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},

              {:text => 'Andy 079.*',
                  :replacement => 'Andy [mobile number]',
                  :regexp => true,
                  :info_request => InfoRequest.find_by_url_name('cctv_data_retention_and_use')
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},

              {:text => '.Complaints and Corporate Affairs Officer.,\s+Westminster Primary Care Trust.+',
                  :replacement => 'Andy [mobile number]',
                  :regexp => true,
                  :info_request => InfoRequest.find_by_url_name('how_do_the_pct_deal_with_retirin_113')
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},

              {:text => 'Your password:-\s+[^\s]+',
                  :replacement => '[password]',
                  :public_body => PublicBody.find_by_url_name('home_office'),
                  :regexp => true,
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},
              {:text => 'Password=[^\s]+',
                  :replacement => '[password]',
                  :public_body => PublicBody.find_by_url_name('home_office'),
                  :regexp => true,
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'}]
rules_data.each do |d|
    rule = CensorRule.regexps.find_by_text(d[:text])
    if rule.nil?
        CensorRule.create(d)
    end
end<commit_msg>Fix typo in replacement field.<commit_after>rules_data = [{:text => '\*\*\*+\n<NAME>.*',
                  :replacement => '',
                  :regexp => true,
                  :info_request => InfoRequest.find_by_url_name('total_number_of_objects_in_the_n_6')
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},

              {:text => 'Andy 079.*',
                  :replacement => 'Andy [mobile number]',
                  :regexp => true,
                  :info_request => InfoRequest.find_by_url_name('cctv_data_retention_and_use')
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},

              {:text => '.Complaints and Corporate Affairs Officer.,\s+Westminster Primary Care Trust.+',
                  :replacement => '\\1',
                  :regexp => true,
                  :info_request => InfoRequest.find_by_url_name('how_do_the_pct_deal_with_retirin_113')
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},

              {:text => 'Your password:-\s+[^\s]+',
                  :replacement => '[password]',
                  :public_body => PublicBody.find_by_url_name('home_office'),
                  :regexp => true,
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'},
              {:text => 'Password=[^\s]+',
                  :replacement => '[password]',
                  :public_body => PublicBody.find_by_url_name('home_office'),
                  :regexp => true,
                  :last_edit_editor => 'system',
                  :last_edit_comment => 'Refactored from remove_privacy_sensitive_things!'}]
rules_data.each do |d|
    rule = CensorRule.regexps.find_by_text(d[:text])
    if rule.nil?
        CensorRule.create(d)
    end
end
{'fraction_non_alphanumeric': 0.1287395782246199, 'fraction_numerical': 0.003678273663560569, 'mean_word_length': 1.9948604992657857, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 65, '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': '2086936', 'n_tokens_mistral': 1238, 'n_tokens_neox': 1137, 'n_words': 187}