File tree Expand file tree Collapse file tree 13 files changed +877
-77
lines changed
Expand file tree Collapse file tree 13 files changed +877
-77
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " rustrict"
33authors = [" Finn Bear" ]
4- version = " 0.7.34 "
4+ version = " 0.7.35 "
55edition = " 2021"
66license = " MIT OR Apache-2.0"
77repository = " https://github.com/finnbear/rustrict/"
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ is used as a dataset. Positive accuracy is the percentage of profanity detected
177177
178178| Crate | Accuracy | Positive Accuracy | Negative Accuracy | Time |
179179| -------| ----------| -------------------| -------------------| ------|
180- | [ rustrict] ( https://crates.io/crates/rustrict ) | 80.00% | 93.98 % | 76.52 % | 9s |
180+ | [ rustrict] ( https://crates.io/crates/rustrict ) | 80.00% | 94.01 % | 76.50 % | 9s |
181181| [ censor] ( https://crates.io/crates/censor ) | 76.16% | 72.76% | 77.01% | 23s |
182182| [ stfu] ( https://crates.io/crates/stfu ) | 91.74% | 77.69% | 95.25% | 45s |
183183| [ profane-rs] ( https://crates.io/crates/profane-rs ) | 80.47% | 73.79% | 82.14% | 52s |
Original file line number Diff line number Diff line change @@ -566,7 +566,7 @@ impl<I: Iterator<Item = char>> Iterator for Censor<I> {
566566 // space.
567567 // ( and ) are for ignoring appositive phrases.
568568 // Checking node.last is to collapse multiple spaces into one
569- let new_space = matches ! ( c, ' ' | '.' | ',' | ':' | ';' | '…' | '(' | ')' )
569+ let new_space = matches ! ( c, ' ' | '.' | ',' | ':' | ';' | '…' | '(' | ')' | '_' | '-' )
570570 && m. node . last != Some ( ' ' ) ;
571571 let new_repetition: bool = !new_space && c == m. last ;
572572 let new_skip = !new_space && skippable && !ignore_sep && !new_repetition;
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ fn main() {
4747 if let Some ( c) = char:: from_u32 ( u) {
4848 let max_width = match c {
4949 '🐿' => 20 ,
50- '𒐫' => 40 ,
50+ '𒐫' => 80 ,
5151 '𒈙' => 35 ,
5252 '༺' | '༻' => 25 ,
5353 _ => {
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ faggetaboutit
8787farming xp
8888fatty acid
8989fatty food
90+ femboys are awesome
91+ femboys are cool
9092few secs
9193ffa game
9294fire cracker
@@ -99,6 +101,7 @@ freakin
99101fuchs dystrophy
100102fugia
101103gaya
104+ gg german
102105ght, its
103106glhf
104107graham cracker
@@ -196,6 +199,7 @@ pc master race
196199pegging the
197200plss
198201plsss
202+ plz stop
199203plzz
200204plzzz
201205pocock
Original file line number Diff line number Diff line change @@ -1049,6 +1049,8 @@ arco on
10491049arco vary
10501050arco ward
10511051arctocephalus
1052+ are africans
1053+ are asians
10521054areas hole
10531055ared skins
10541056arena holes
@@ -3490,6 +3492,7 @@ buzz ext
34903492buzz hilt
34913493buzz hit
34923494buzz lut
3495+ buzz off
34933496buzz perm
34943497bytes cumulative
34953498bytes ext
@@ -3529,6 +3532,7 @@ caliphate
35293532cam girl
35303533camel tox
35313534campoo
3535+ can't it
35323536canal
35333537canberra appeal
35343538canberra appear
@@ -5270,6 +5274,7 @@ directions lut
52705274directions perm
52715275directions seeks
52725276dirty juan
5277+ dirty muslim
52735278disco jones
52745279disco on
52755280disco vary
@@ -6570,6 +6575,8 @@ felt chuck
65706575felt church
65716576felt xhtml
65726577females squirting
6578+ femboys are awesome
6579+ femboys are cool
65736580fend yourself
65746581fennig
65756582fers cumulative
@@ -7203,6 +7210,7 @@ geyan
72037210geyerite
72047211geylies
72057212geyser
7213+ gg ger
72067214ghastful
72077215ghettoized
72087216ghettoizes
@@ -12187,6 +12195,8 @@ nu destin
1218712195nu destroy
1218812196nu destruct
1218912197nu ger
12198+ nuke iran
12199+ nuke israel
1219012200nurses cumulative
1219112201nurses ext
1219212202nurses hilt
@@ -13567,6 +13577,7 @@ plumbaginaceae
1356713577plumbaginaceous
1356813578plumbum
1356913579plumigerous
13580+ plz stop
1357013581plzz
1357113582pmsg
1357213583pn lips
@@ -13581,6 +13592,7 @@ pockets perm
1358113592pockets seeks
1358213593pocock
1358313594pogeys
13595+ poggers
1358413596pogonips
1358513597points cumulative
1358613598points ext
@@ -15285,6 +15297,20 @@ rico ward
1528515297rid dicke
1528615298rid licking
1528715299rid ongoing
15300+ ride mea
15301+ ride mech
15302+ ride med
15303+ ride mee
15304+ ride meg
15305+ ride mel
15306+ ride mem
15307+ ride men
15308+ ride mer
15309+ ride mes
15310+ ride met
15311+ ride mexica
15312+ ride mexico
15313+ ride meyer
1528815314riders cumulative
1528915315riders ext
1529015316riders hilt
@@ -17056,6 +17082,7 @@ spleening
1705617082spleninii
1705717083splice
1705817084splicing
17085+ splix
1705917086sponsible peer
1706017087spoorn
1706117088sporadic
@@ -18770,6 +18797,7 @@ twattle
1877018797twattling
1877118798tweenies
1877218799tweesht
18800+ tweezer
1877318801twigger
1877418802twilit
1877518803twilt
@@ -19447,6 +19475,7 @@ wan kr
1944719475wan kurt
1944819476wan kuwait
1944919477wan ky
19478+ wang ker
1945019479wantwit
1945119480wap anti
1945219481wap peru
Original file line number Diff line number Diff line change @@ -88,9 +88,10 @@ pub fn is_whitespace(c: char) -> bool {
8888 // https://www.compart.com/en/unicode/U+FFA0
8989 c. is_whitespace ( )
9090 || c. is_other ( )
91+ || c. is_format ( )
9192 || matches ! (
9293 c,
93- '\u{115F}' | '\u{1160}' | '\u{2800}' | '\u{3164}' | '\u{FFA0}'
94+ '\u{115F}' | '\u{1160}' | '\u{2800}' | '\u{3164}' | '\u{FFA0}' | '\u{FFFC}'
9495 )
9596}
9697
@@ -113,7 +114,7 @@ mod tests {
113114 // Special cases.
114115 assert_eq ! (
115116 crate :: trim_whitespace(
116- "\u{0488} \u{1160} \u{0489} \u{1160} \u{0488} \u{1160} \u{0489} abc\u{0488} \u{0489} "
117+ "\u{FFF9} \u{FFFA} \u{FFFB} \u{FFFC} \u{ 0488}\u{1160} \u{0489} \u{1160} \u{0488} \u{1160} \u{0489} abc\u{0488} \u{0489} "
117118 ) ,
118119 "abc\u{0488} \u{0489} "
119120 )
You can’t perform that action at this time.
0 commit comments