Remove sexually explicit typos rule and add migration for masked call participants
This commit is contained in:
@@ -12,4 +12,6 @@ gtfo
|
||||
// and other stuff.
|
||||
keys
|
||||
// Many people not knowing paki is a slur, it's better to keep it here.
|
||||
paki
|
||||
paki
|
||||
hoe
|
||||
ho
|
||||
@@ -1 +0,0 @@
|
||||
ho
|
||||
@@ -56,9 +56,6 @@ gang bang
|
||||
squirt
|
||||
squirting
|
||||
squirts
|
||||
hoe
|
||||
// ho is in "explicit sexual language typos" because it's usually also a typo of "hi". it gets
|
||||
// censored instead of banned.
|
||||
slut
|
||||
dldo
|
||||
dildo
|
||||
|
||||
@@ -559,43 +559,6 @@ impl Rule for ExplicitSexualLanguageRule {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct ExplicitSexualLanguageTypoRule {
|
||||
pattern: Regex,
|
||||
exceptions: Vec<String>,
|
||||
}
|
||||
|
||||
impl ExplicitSexualLanguageTypoRule {
|
||||
fn new() -> Self {
|
||||
let (phrases, exceptions) =
|
||||
parse_phrases_file(include_str!("lists/explicit-sexual-language-typos.txt"));
|
||||
|
||||
let regex = regex_from_phrases_list(&phrases);
|
||||
|
||||
Self {
|
||||
pattern: regex,
|
||||
exceptions,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Rule for ExplicitSexualLanguageTypoRule {
|
||||
fn action(&self) -> &'static Action {
|
||||
&Action::SoftCensorAndWarn
|
||||
}
|
||||
|
||||
fn name(&self) -> &'static str {
|
||||
"Explicit Sexual Language Typo"
|
||||
}
|
||||
|
||||
fn detect(&self, _original: &str, normalized: &str) -> (Vec<String>, Vec<String>) {
|
||||
(
|
||||
vec![],
|
||||
find_with_exceptions(normalized, &self.pattern, &self.exceptions),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct SuggestiveLanguageRule {
|
||||
pattern: Regex,
|
||||
@@ -805,7 +768,6 @@ pub static RULES: Lazy<Vec<Arc<dyn Rule>>> = Lazy::new(|| {
|
||||
Arc::new(HateSpeechAndSlursRule::new()),
|
||||
Arc::new(ThreatsAndSelfHarmRule::new()),
|
||||
Arc::new(ExplicitSexualLanguageRule::new()),
|
||||
Arc::new(ExplicitSexualLanguageTypoRule::new()),
|
||||
Arc::new(SuggestiveLanguageRule::new()),
|
||||
Arc::new(AdvertisingRule),
|
||||
Arc::new(SensitiveTopicsAndTriggeringContentRule::new()),
|
||||
|
||||
Reference in New Issue
Block a user