Navigation

    CreatiCode Scratch Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode

    How would one implement a swear word/inappropriate message filter in their project?

    Help
    4
    21
    1020
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jeffreyrb03-gmail
      JaecadeJnight Mod Helper last edited by

      My goal/objective is to just check if a string (“You are %^%& stupid”) has profanity and/or is really offensive/inappropriate, and return either “true” or “false”.

      Using ChatGPT and asking it if a message sent is inappropriate or not is out of the question, because ChatGPT would just refuse to respond if a message is inappropriate or possibly get me banned if enough inappropriate things. I also know defining a list of swear words and then checking if a string contains them is probably disallowed, considering Scratch does that and it makes sense since people will look at your code and see profanity. I’ve seen people use this method before, but I dislike the amount of work it will require: basically you have to define every single word in the dictionary, except for curses, and if a string has any words that it doesn’t contain, then it will do something like censor or block it.

      I’ve thought of a somewhat okay solution though, but it sucks because it requires more work off CreatiCode and will probably just stop working if it’s overloaded with requests. The solution is using the de2eea67-cb7a-4f2d-905f-b692016076b2-image.png block, but I just make my own API where it will check if a string is offensive or hurtful, and return either true or false. But this solution sucks because a vanilla CreatiCode solution is better than coding some NodeJS site and retrieving it’s response with this block.

      I also thought of the using semantic database blocks and a table with bad things in it, but once again, I will have to store inappropriate things within a list/table in my project, which is a no-no.

      What is a better/allowed way of doing this? Or am I allowed to do the stuff I said above like defining a list of swears and checking a string against that, but with the source code hidden?(, since this isn’t Scratch and you guys don’t have the same rules.)

      #LLJW
      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

      c. Tyller_ 2 Replies Last reply Reply Quote 0
      • c.
        Cαƚƚყ Mod Helper @jeffreyrb03-gmail last edited by c.

        @jeffreyrb03-gmail
        But somebody could report you for that.
        The list.

        Official Forums Moderator

        jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
        • jeffreyrb03-gmail
          JaecadeJnight Mod Helper @c. last edited by

          @cattyplayzy thats exactly why I said I didn’t wanna do that

          #LLJW
          <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

          1 Reply Last reply Reply Quote 0
          • c.
            Cαƚƚყ Mod Helper last edited by

            @jeffreyrb03-gmail
            ok

            Official Forums Moderator

            1 Reply Last reply Reply Quote 1
            • Tyller_
              Tyller_ Best Forum Helpers @jeffreyrb03-gmail last edited by

              @jeffreyrb03-gmail I’d assume that a regex would be allowed to check for bad words, I made a chat rooms thingy and just store all the messages in a database with ways to search through it and find bad messages, you could very easily make a regex and just expand it with swear words, as long as it’s hard set it would probably be fine, and with ChatGPT, as long as bad words can’t get you banned, you can ask it to say something if this message should be flagged, and something if it shouldn’t, then go based off what it says, and if it says something different you assume it isn’t just being stubborn at you asking it to say stuff but that the message triggered it’s censor (so if they say a word that triggers ChatGPT’s filter, assuming it’s a preset message you could check for that)

              <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
              </div>

              info-creaticode jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
              • info-creaticode
                CreatiCode @Tyller_ last edited by

                We are going to add a new block for content moderation. You can use it to check whether a message is appropriate.

                jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
                • jeffreyrb03-gmail
                  JaecadeJnight Mod Helper @Tyller_ last edited by

                  @tyller_ I was thinking that I could just interpret ChatGPT not answering as false, meaning a message is bad, but I’m pretty sure you can get banned for abusing the AI in that way.

                  #LLJW
                  <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                  1 Reply Last reply Reply Quote 0
                  • jeffreyrb03-gmail
                    JaecadeJnight Mod Helper @info-creaticode last edited by

                    @info-creaticode Ooo, I’m looking forward to that!

                    #LLJW
                    <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                    1 Reply Last reply Reply Quote 0
                    • jeffreyrb03-gmail
                      JaecadeJnight Mod Helper @info-creaticode last edited by

                      @info-creaticode But am I allowed to do things like make a list of swears and check against it?

                      #LLJW
                      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                      info-creaticode 1 Reply Last reply Reply Quote 0
                      • info-creaticode
                        CreatiCode @jeffreyrb03-gmail last edited by

                        @jeffreyrb03-gmail said in How would one implement a swear word/inappropriate message filter in their project?:

                        @info-creaticode But am I allowed to do things like make a list of swears and check against it?

                        If you already have a list of words you would like to check against, you can write code to check them in your project, so you won’t need any new blocks, right?

                        c. jeffreyrb03-gmail 2 Replies Last reply Reply Quote 1
                        • c.
                          Cαƚƚყ Mod Helper @info-creaticode last edited by c.

                          @info-creaticode
                          Yes, but someone could mass report it for swearing, therefore we kinda need a new block…

                          Official Forums Moderator

                          jeffreyrb03-gmail 1 Reply Last reply Reply Quote 1
                          • jeffreyrb03-gmail
                            JaecadeJnight Mod Helper @info-creaticode last edited by

                            @info-creaticode That is true, new blocks aren’t needed, but in my original post I was assuming that I’m not allowed to make a list of curses and then check against it because someone might view my project’s code and then see that, but I’m just wondering if that is allowed

                            #LLJW
                            <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                            info-creaticode 1 Reply Last reply Reply Quote 0
                            • jeffreyrb03-gmail
                              JaecadeJnight Mod Helper @c. last edited by

                              @cattyplayzy Also that is a good point, but I was asking with this post like what methods are allowed to do this sorta thing, a new block would be cool and convienient, but we don’t really need one. It seems like making a list of swears and then checking against that is fine, so I’ll just use that until told otherwise.

                              #LLJW
                              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                              1 Reply Last reply Reply Quote 0
                              • info-creaticode
                                CreatiCode @jeffreyrb03-gmail last edited by

                                @jeffreyrb03-gmail

                                In that case, probably it’s better to publish it so others won’t see the list.

                                jeffreyrb03-gmail c. 2 Replies Last reply Reply Quote 0
                                • jeffreyrb03-gmail
                                  JaecadeJnight Mod Helper @info-creaticode last edited by

                                  @info-creaticode Ohhh, true. Thank you, now I know it’s allowed so I’ll use it.

                                  #LLJW
                                  <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                                  1 Reply Last reply Reply Quote 0
                                  • c.
                                    Cαƚƚყ Mod Helper @info-creaticode last edited by

                                    @info-creaticode
                                    What if others are looking forward to making such chatrooms?
                                    How would they get a source code?

                                    Official Forums Moderator

                                    jeffreyrb03-gmail 1 Reply Last reply Reply Quote 0
                                    • jeffreyrb03-gmail
                                      JaecadeJnight Mod Helper @c. last edited by

                                      @cattyplayzy Well too bad for them lol. You could just offer the project file but with the filter removed and then tell people when remixing it, they have to make a filter for it

                                      #LLJW
                                      <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                                      c. 1 Reply Last reply Reply Quote 0
                                      • c.
                                        Cαƚƚყ Mod Helper @jeffreyrb03-gmail last edited by

                                        @jeffreyrb03-gmail
                                        Then the mass reporting hits…

                                        Official Forums Moderator

                                        Tyller_ 1 Reply Last reply Reply Quote 0
                                        • Tyller_
                                          Tyller_ Best Forum Helpers @c. last edited by

                                          @cattyplayzy there isn’t a strict requirement for a filter, I’d assume that CreatiCode would prefer you have a filter, and I’d assume that the report system doesn’t flag by itself, they have to include a description of what exactly breaks the rules (I checked and the next button in report has you enter text) so as long as you have it properly labeled as a censor, CreatiCode wouldn’t punish you if your intentions for why you had the inappropriate language weren’t bad

                                          <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
                                          </div>

                                          c. 1 Reply Last reply Reply Quote 1
                                          • c.
                                            Cαƚƚყ Mod Helper @Tyller_ last edited by

                                            @tyller_
                                            Oh, you could use the Game Leaderboard as a flagging system.

                                            Official Forums Moderator

                                            jeffreyrb03-gmail 1 Reply Last reply Reply Quote 0
                                            • jeffreyrb03-gmail
                                              JaecadeJnight Mod Helper @c. last edited by

                                              @cattyplayzy I honestly think databases (with the source code hidden of course) would be 1000x easier and more convienient to do.

                                              @cattyplayzy said in How would one implement a swear word/inappropriate message filter in their project?:

                                              How would they get a source code?

                                              also with this, honestly some people need to write their own code. It’s good to take code from others, but when the source code is hidden for something, then you just have to accept that and try to recreate it using what you already know. Unless of course you like reverse engineer something to hack it

                                              #LLJW
                                              <span style="color:white;background-image:linear-gradient(to right, lightblue, navy)">My name is Jeff</span>

                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post