2 unstable releases

0.3.0 Sep 6, 2023
0.2.0 Sep 4, 2023

#159 in Internationalization (i18n)

Download history 2/week @ 2024-02-18 18/week @ 2024-02-25 1/week @ 2024-03-03 30/week @ 2024-03-10 1/week @ 2024-03-17 23/week @ 2024-03-31

54 downloads per month

MIT license

13KB
214 lines

sensitive-words-recognizer

This is a sensitive word crate.

The Features:

  • replace_sensitive_word()
fn filter_sensitive_words() {
    let str_vec = vec![
        "花呗信用卡代还OK套现",
        "套花呗分期代付",
        "马上套现信用卡",
        "期货套利",
        "空手套白狼",
        "守信用卡脖子",
        "坚定信心,同舟共济,科学防治,精准施策",
        "D+1还是T+1秒到结算免结算费",
        "Fuck you!",
        "Son of Bitch",
    ];

    println!("replace_sensitive_word......");
    for str in &str_vec {
        let replace_str = replace_sensitive_word(str, &MatchType::MinMatchType, '*');

        println!("{} --> {}", str, replace_str);
    }
}

Dependencies

~49KB