Edit filter configuration

Differences between versions

ItemVersion from 20:48, 12 May 2023 by Suffusion of YellowVersion from 20:54, 12 May 2023 by Suffusion of Yellow
Basic information
Notes:
Fork of filter 1204. Still too many FPs there to set to warn, but further attempts to reduce FPs are leading to too many edits being missed. So leaving that one as tag-only. Hopefully this can be set to warn. --Suffusion of Yellow 20:47 12 May 2023
Fork of filter 1204. Still too many FPs there to set to warn, but further attempts to reduce FPs are leading to too many edits being missed. So leaving that one as tag-only. Hopefully this can be set to warn. --Suffusion of Yellow 20:47 12 May 2023
Rm "arrests", require large edit_delta when adding a section title, exclude "military" and some related words, exclude limit to articles created in the last year, not about an event from before 2020, exclude bots and admins (but not EC). --Suffusion of Yellow 20:53 12 May 2023
Filter conditions
Conditions:
(documentation)
page_namespace == 0 &
page_namespace == 0 &
!contains_any(user_groups, "sysop", "bot") &
(
(
     perpline := "(?i)(?:perp(?:etrator)?s?|assailants?|accused|convicted|arrests)\s*=[ \t]*((?=\S)[^\n<|]*)";
     perpline := "(?i)(?:perp(?:etrator)?s?|assailants?|accused|convicted)\s*=[ \t]*((?=\S)[^\n<|]*)";
    
    
     added_lines irlike perpline & (
     added_lines irlike perpline & (
         (
         (
             /* Change to the infobox */
             /* Change to the infobox */
             perp_old := get_matches(perpline, removed_lines);
             perp_old := get_matches(perpline, removed_lines);
             perp_new := get_matches(perpline, added_lines);
             perp_new := get_matches(perpline, added_lines);


             norm(perp_old[1]) != norm(perp_new[1]) &
             norm(perp_old[1]) != norm(perp_new[1]) &
             !(perp_new[1] irlike "^(?:\s*unknown\s*)?$|^\s*\{\{flag")
             !(perp_new[1] irlike "^(?:\s*unknown\s*)?$|\{\{flag|army|navy|force|government|military")
         ) | (
         ) | (
             /* New section */
             /* New section */
             new_wikitext irlike ("==\s*" + perpline) &
             new_wikitext irlike ("==\s*" + perpline) &
             !(old_wikitext irlike ("==\s*" + perpline))
             !(old_wikitext irlike ("==\s*" + perpline)) &
            edit_delta > 250
         )
         )
     ) &
     ) &
     !(added_lines contains "<math") &
     !(added_lines contains "<math") &
     !(new_wikitext irlike "category:(?:.* in )?(?:\d{1,3}|1[0-8]\d\d|19[0-4]\d)\b")
     !(new_wikitext irlike "category:(?:.* in )?(?:\d{1,3}|1\d\d\d|20[01]\d)\b")
) & (
) &
    page_age;
page_age < 365 * 86400
    true;
)