Quote wall
This is just a simple page to test some basic things. Here we'll test for example the user content system that I'm adding, through simple one liner quotes.
I've been playing around with a way to add community quotes to my front page. This isn't very tricky, until you realize people can say some pretty nasty things.
My first step was to add a manual moderation system. This worked great, and from here I moved on to a very simple string match profanity library called better-profanity.
This too worked great, but I quickly moved on to VADER, a more advanced, mathematically based profanity filter that weighs the profanity value of all the words in a phrase against each other. In some aspects, it worked better. In others, it was worse. The phrases "hell yeah" and "fuck you" outputted nearly the exact same value of a little under -0.5.
This was clearly not the solution, but neither are LLMs. Locally run LLMs are far too resource heavy to run on my little web server, and I simply don't trust companies like Google, OpenAI and Anthropic 1: with the data of my website's readers and 2: to still exist in the next 3 years.
To solve this rather annoying problem, I think I may have found the best option available. An open source, pre-trained moderation Python library called detoxify. While of course not perfect - I can't for example find any details about Dutch profanity filtering - it's certainly better than my other options.
After setting up detoxify and trying the standard toxicity filters, I found that terms like "Fuck yeah" and "Holy fuck" are flagged as very toxic. This is of course not supposed to happen, so I'm switching from 'toxicity' as a primary filter to 'insult', supported by 'threat' and 'identity attack'. These are much more important to filter out than only a handful of curse words. I am of course proudly Dutch, and it's in my cultural blood to use profanity in a non-offensive way .
For the easy formatting of my pages, I have included a markdown addon for wagtail. This makes it significantly easier to type good looking, clean text in large paragraphs without me needing to put a lot of effort into it. I'm very familiar and comfortable with MD, so something like this is a great benefit to myself.
Community Quotes
Test Quote 5
jolly good response, mate
He’s clever and hard-working. Rarely do I meet individuals with such high critical and practical abilities. Future ethical employer: hire him. You’ll be more than satisfied.
poopie
penis AHAHHAHAHAHAHAdd a Quote