8 ms·
I love this. I particularly like that arsenal is censored to a___nal.
by IanCal 7y ago
I love this.
I particularly like that arsenal is censored to a___nal.
- yummybear 7y agoass, however is not
- np_tedious 7y agoCan these ligatures be applied recursively?
- StavrosK 7y agoRecursively how?
- np_tedious 7y agoPretty sure the answer is "no" but I'll explain more what I was wondering. Assume "arse" and "anal" are both on the bad and that underscores are treated like irrelevant whitespace. Arsenal A___nal A______
- StavrosK 7y agoYou mean "arse" and "enal"? So basically overlaps? That's a good question, I'm not sure what happens there, I think the first ligature "wins". Yeah, if you type "cuntits" it only censors "unt".
- np_tedious 7y agoNo. I mean first the "arse" rule is applied, and then the "anal" rule (because this didn't exist previously and because the blanked out letters are ignored) is applied next
- StavrosK 7y agoOh, I see. No, that's not how ligatures work. I also don't see why A___nal would be censored, it's clearly not intended to be a curseword.
- np_tedious 6y agoJust running with the idea expressed an a parent comment above. I think neither "anal" nor "arse" should be censored
- Etheryte 7y agoThat sounds unlikely, ligatures are two or more consecutive graphemes graphemes joined into a single glyph, but only visually. The underlying text is unmodified, so as far as the renderer is concerned, the text is still "arsenal".
- oefrha 7y agoInspired by you, I grepped my system words file in search of words containing fuck. What I didn't expect is Apple's /usr/share/dict/words comes pre-censored. > grep fuck /usr/share/dict/words > grep '^shit$' /usr/share/dict/words > grep '^dick$' /usr/share/dict/words dick > grep '^cunt$' /usr/share/dict/words > grep '^bitch$' /usr/share/dict/words bitch Wow. (This comment doesn't reflect well on me. Fortunately, this is a pseudonymous account.)
- deleted 7y ago[deleted]
- StavrosK 7y ago> (This comment doesn't reflect well on me. Fortunately, this is a pseudonymous account.) If anyone thinks less of you because you simply know five swearwords, it's pretty much their problem.
- oefrha 7y agoNah, not that. "in search of words containing fuck" — just not a very mature thing to do.
- StavrosK 7y agoOn the contrary, that's how science is made.
- JacobAldridge 7y agoFUCK is still my default “Find>Replace>Find>Replace” placeholder. Need to shift a wad of spreadsheet cells laden with formulas but don’t want to risk anything? Find All “=“ Replace with “FUCK” Copy/Move Find All “FUCK” Replace with “=“ Also handy for updating words or names when word processing. The choice dates back to my first computer - I remember replacing all spaces “ “ with “FUCK” and watching gloriously as the assignment I had written was slowly turned into curse word gibberish. I tell myself I still do it because (especially capitalised) it does stand out as an error in a way other placeholders may not. But it’s mostly for the fun and cheap thrill - pretty sure only one client ever got a document that I had left fucked up in this way. [Edit to add: Nothing pseudonymous about my account name, but I’ll fucking own it.]
- JosephRedfern 7y agoWhat happens if a string has two potential ligatures? For instance, if there was a ‘abc’ ligature and a ‘bcd’ ligature, how would ‘abcd’ be rendered? Is there a priority/hierarchy?
- ekimekim 7y agoI tried this in their tool, "shitwat" comes out as "s*wat"
- Datenstrom 7y agoCall of Duty has censored all input with a regex like this for as long as I can remember. I can't even name one of my classes "Assault" which isn't even viewable publicly. You would think it would be easy to add a whitelist for such a common word.
- deleted 7y ago[deleted]
- MrLeap 7y agoI remember playing Ragnarok Online back in 2005ish. I was working on my merchant. Merchants had an ability to get better sale prices to NPCs, so one common way to make money by buying some item from players in bulk for more than they could get vendoring it, and you make margin on it by getting even more. Arbitrage! My skills weren't high enough to compete with other merchants on the highest margin common items, so I decided to try one of the lower priced things. Squeeze into some kind of niche, you see. Around this time, I discovered the censorship list was enforced client side (oh the wild west old days...), To make a long story long, there were these crabs and they dropped an item called "nippers". They were kind of a cute thing because though that was what they were called by the game's creators, the game censored you for saying it. I removed "nip" from the list of gylphs, I could shout an offer to buy them without interference. This let me buy these items from players without any competition. As the only dedicated purchaser, I was able to preserve a much higher margin. Thanks to a soft monopoly preserved by regulations and information asynchrony, I was able to make significantly more money than I would have otherwise. That taught a lot of lessons to ~15 year old me. If only I could have applied those lessons in the real world!
- tzs 7y agoI had occasion to write a chat server for a small gaming service once. The way I came up with to do the profanity filter ended up working a lot better than I expected it to, and avoided the problem you describe. It worked like this. 1. Make a copy of the text to be filtered, modified as follows. -- change upper case letters to lower case -- change 0 to o, 1 to i, 3 to e, 5 to s, and vowels with various accent marks to the corresponding unaccented lower case vowel -- discard anything else For example, if the input was "Start the assault. let's f-u-c-k them" it would become "starttheassaultletsfuckthem". 2. Scan this for any substrings that are on the bad word list. In this case it would find "ass" and "fuck" [1]. 3. If no bad words are found, the original string is returned and we are done. 4. For each word in the original string, look it up in the dictionary (I believe I used /usr/dict/words). Note the ranges of character positions in the original string of the words that are spelled correctly. 5. For each bad word found in the filtered string, if all of its characters came from positions in the original string that were part of correctly spelled words, leave it alone. Otherwise, asterisk out its characters in the original string. In the above example, "ass" would be left alone because all of its characters came from "assualt" which is recognized as a correctly spelled word. None of "fuck" came from correctly spelled words, so it would get zapped. The final result would be start the assault. let's *-*-*-* them. [1] Well...actually not. I just checked my archives and found the chat server bad word list. It did not include "ass".
- dylan604 7y agowell, technically, arsenal are shit. so, transitively, it make sense. I miss my footy!!!!
- chrisma0 7y agoHow long did you take to come up with this gem?! I must know.