Bad Jokes

robotdude

Canada

So Lieutenant Commander Data the customers greeting droid is awesome!

He is still fully functional for two years (24/7) now without any major issues (except 2 dead servos and flaky EZ-Board connectivity).

However, I have a small bug.... I’m using a random RSS joke by using this script: SpeakRSSDescription("http://www.jokesareawesome.com/rss/random/"; ) in the Personality Generator.

83.7% of the time Data pulls hilarious jokes every once in a while but because there is no filter. He may say dirty jokes or very long jokes.

Do you know how to filter this out or do you have a better RSS source? For now, I load him with predefined jokes but this is only a bandage and I want him to be more original (and hilarious).

Any suggestions?

User-inserted image

By — Last update

ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

#1  

@robotdude Well, it amounts to a series of good news, bad news statements.

The good news is that it can be done. The bad news, not with the SpeakRSSDescription script instruction. The reason is because it does not return the string which is the joke. It just says it. So, the bad news is that you will have to get the joke text yourself via the HTTPGet instruction.

The worse news is that doing it that way means you will have to find the joke text in the web page data. The good news is that's not difficult since it is the very last thing on the page. The bad news is that it is a web page. Web pages are chock-a-block loaded with characters which will cause a script to crash, including the part with the joke. I know, I looked at the raw text from the web page.

The good news is that I have a solution for that which I recently posted to the cloud. The system will allow you to safely load the Joke web page and the joke text itself. After that it will be up to you to come up with a script that will take the joke text and check it for being too long or for offensive words. The "Length" function can tell you if it's too long. Checking for bad words will take an array filled with those words, You would use the array in a loop to see if any of them are in the text.

I can write a starter script to get you going if you like. It would only take a few minutes to do off the top of my head. So it won't be tested. You will have to do debugging. But I can answer questions as they come up. I'm tied up with another project I really need (and want) to get going better.

#2  

The way I do random jokes is have the jokes I want as line items in a text file, even if the lines are very long, it's ok. You can keep adding to the text file over time, which is what I do as I run across one that I think are funny.

I'm also going to make a family friendly list and an adult party list of jokes for my robot, who is also named Data from StarTrek TNG. :D

The I use FileReadLineRandom in an EZ-Script.
https://synthiam.com/Tutorials/UserTutorials/176/1

PRO
Synthiam
#3  

Or use Google to find an rss fees that is cleaner:) that'll be the easiest

#4  

Hahahaha....whats so bad about Lieutenant Commander Data telling a dirty joke in a totally emotionless synthesized TTS voice? Nothing seems to be funnier than that...;)

Well TTS itself is kind of difficult, the nature of it makes it so hard to even understand whats going on sometimes...there is almost no timing no rhythm and as there is no understanding from the narrators side on whats going on, jokes are the perfect example on why things are not working out!:D

My favorite non sense Twitter accounts are...

Bunny Buddism https://twitter.com/bunnybuddhism

The Master Yoda Bot https://twitter.com/yoda_bot?lang=de

And if you just piece together a couple of random words every now and then you can make some thoughtful stuff!:D https://twitter.com/everyword

P.S. of course it is obvious that you do NOT want Data to talk dirty to customers in the hallway, I am totally aware of it! Man but just thinking of it makes me laugh so hard!:D:D:D