AdvancedProfanityFilter
AdvancedProfanityFilter copied to clipboard
Shuffled Substitutions
New user here. Perhaps this is already possible, please let me know.
:loudspeaker: The Shortcoming
I'm using the substitution mode in online forums. The substituted words are so rarely used by people in natural conversations, that I'm able to deduce the original, censored words, thanks to their similarities. This effectively nullifies the effect of substitution mode: the profanities are removed from the page, but I can still "hear" them.
:microscope: Describe the solution you'd like
If the profanity substitutes are picked in a shuffled, randomized manner, the effect could be improved. Making it configurable, whether to use all substitutions, or just ones starting with the same letter, (etc.) might also be a good idea. Of course, this functionality should be opt-in.
To be honest, I'm not sure if this feature would work well. It's possible that the profanities are still easily deducible, since people often use the same slang and grammar, which makes it easy to pattern-match. Feedback is welcome.
:triangular_ruler: Describe alternatives you've considered
Using a different word list might help. However, if the substitution algorithm always picks the same words, you're able to relearn the profanities over time.
Welcome @Lisoph, glad to have you here! A long time ago I had allowed users to have multiple words to substitute, but went away from it because it (obviously) led to different results each page load that wasn't liked by most of the users. Today it is 1-1, or really a true "substitution".
I agree with you that if we added something like this it should be opt-in, and could be implemented as another filter method (Censor, Substitute, etc.), possibly "Replace". One of the benefits of the current method is on words that can handle being a partial match (like the "F" word), the current substitutions were picked to be ones that could handle different variations. For instance, if the word F---ing
is found, the filter can substitute with Freaking
, instead of just Freak
, which really helps reading feel more natural.
With your suggestion, do you see it being just a pool of words (maybe funny words? Klingon? Tolkien Elvish? Harry Potter spells, etc.) that could be replaced randomly? What I mean is, would it just be a list of words and when the filter finds any word to filter, it just picks one of those? Or were you thinking you could specify a list of words for each word that the filter chooses from?
Looking forward to discussing this more. Thanks for the suggestion!
Thanks @richardfrost for the quick and thorough reply!
With your suggestion, do you see it being just a pool of words [...] that could be replaced randomly? What I mean is, would it just be a list of words and when the filter finds any word to filter, it just picks one of those? Or were you thinking you could specify a list of words for each word that the filter chooses from?
I was thinking one big pool, but I can see it work both ways. Perhaps a combination - a per-word replacement list with a global pool fallback? The big pool is of course more straightforward to implement and way easier to manage.
I'm thinking about implementing a proof of concept, just to get a feel for how this would work. I'm not familiar with this codebase, so I might go the Tampermonkey route. Does AdvancedProfanityFilter have a text file with replacement words that I could try out? I'd like to try it with "normal" substitutions before trying out Klingon.
(maybe funny words? Klingon? Tolkien Elvish? Harry Potter spells, etc.)
Great minds think alike, I had the same idea 😁. A comedy-wordlist could be quite fun!
Going on a tangent: I once had to store numbers in filenames as compact as possible. What I did was convert the base-10 numbers to base-254 using Unicode Braille characters. There's 254 of them (not counting whitespace). Translating profanities to Braille might be another fun idea, albeit mildly crazy.
@Lisoph One big pool would definitely be easier, but we could probably expand on it if needed and make it per-word.
The default words are found here, if that's what you're looking for. If you wanted to test things out in the extension, its pretty easy to develop locally if you're interested.
Tangent: That's cool, and a good use of technology! It could be another area that's fun to explore.
+1
Exactly the feature I want! :D
Example: "crap" can be shuffled into:
- very bad
- very terrible
- very horrible
- garbage
- trash
- rubbish
As I mentioned before, this was a feature that was phased out due to not much demand for it, and to help reduce complexity of the UI. Now that there is some new demand for it I'm happy to devote some time to adding the feature.
I'm curious if anyone has any thoughts on how to implement the user interface @throwawayaccountfor, @Lisoph. My first thought is to just add a little note to use a separator (lets just say ;;
for now), and put it in the substitution field directly:
very bad;;very terrible;;very horrible
This would also work globally if you put it in the default substitution.
My first thought is to just add a little note to use a separator (lets just say ;; for now), and put it in the substitution field directly
My first thought is also like that!
This has been included in version 2.40.0. Feel free to comment here if you have any feedback for this update.
To use it, simply separate your substitutions with ;;
. Feel free to share feedback here.
Remember to update documentation, too! https://github.com/FrostCo/AdvancedProfanityFilter/wiki#substitution-mode
Time flies so fast...
https://github.com/FrostCo/AdvancedProfanityFilter/wiki/Home/cf224860f8662806824510e99ea5193bd985d456
@richardfrost @Lisoph Nice! I think the issue can be closed now!
Thanks for staying on top of things @throwaway-d.