How I Built a Profanity Blocking JavaScript Library
Introduction
As developers, we often come across situations where we need...
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
Rock on! Such a cool idea and nice to give folks the option to have this filter.
Also, I appreciate ya labeling that you used AI to assist with the writing... annnnd, particularly cool that it's your own flavor of AI, too!
Good stuff all around, Best Codes. 🙌
Thank you! I'm glad you enjoyed my post.
I believe that I read the guidelines here:
dev.to/devteam/guidelines-for-ai-a...
And they said that I could just put a disclaimer at the end.
I don't like to put it there for some of my posts, because I mostly use AI to rephrase, correct grammar, etc. and not to create content (AI content is quite shallow or uncreative, usually). But, I figure that it's good to be on the safe side and put it there anyway.
I originally made this because I made a simple home and weather monitor for myself, which included a home assistant I made called 'Heather'. I could ask it things, and it would search the Internet and use NLP to generate a result. Obviously, I didn't feel like having my AI spout profanity at me, so I created this filter for incoming commands (in case it misheard) and spoken text (in case the result was unsafe).
To others reading this comment, I will warn you that the word list itself is quite strict (it contains about 400 words, if that gives you an idea), so please feel free to customize it for your needs.
Thanks again for the feedback!
That's exactly right! Putting the disclaimer at the end is totally acceptable.
Plus, it really does sound like you are using it lightly and tactfully. Your post sounds very human to me, it's clear that you're putting yourself into it and that's the main thing as far as we're concerned. 🙂
Oh yeah, good call! That would be an odd and unfortunate experience.
Sounds like you've made a cool bot, and I like that ya went with "Heather" when it's primary task was for monitoring the weather. "Heather, how's the weather?" is satisfying. 😀
OK, great! I'm glad I did everything correctly. 🙂
Actually, one of my friends came up with the name. I told them I was working on a home and weather monitor, and I needed a name for the assistant. They suggested that I combine the H in home with Weather. So, I did. 😀
As you can see, the AI does still need some work, but it described you fairly well, I think:
("Who is Michael Tharrington?")
Anyway, thanks for chatting, and have a great weekend!
Very cool! But is it subject to the Scunthorpe problem?
(Hopefully this comment doesn't trigger the dev.to profanity filters 😅)
I'm glad you brought this up! That's exactly why I included the
matchWord
parameter in my library. That way, ifcat
was a bad word, thencatastrophe
would not trigger it. Plus, many profanity filters (and hopefully mine, here soon) are beginning to use NLP or brain.js filters that analyze sentiment or intent rather than the words themselves (AI, in a sense).Thanks for the feedback!
nice one ;))) nice project
Thanks! I'm glad you liked it.
:/
Interesting though
Hi Jim, thanks for the feedback! It looks like you are using GPT Zero to see if my content is AI. While some of it is (as stated at the bottom of the post), certainly less than 60 sentences are!
I would encourage you to read this article about using GPT Zero here:
gptzero.me/news/5-steps-towards-re...
Thanks again for the feedback and happy coding!
This is so cool
I like the Base64 encoded part
Thanks! I'm glad you enjoyed.