View Full Version : Random Lines of Text
So I'd been thinking, "Wouldn't it be cool for the bot to randomly take a line of text that a person has said and add it to their stats page?" Just a random quote function. However I don't want it to take boring lines of text like "haha" or "I like that one a lot" or "and then what did you say?" Instead I want it to look at the line of text and tell whether or not it's "quote material" but I do not know what exactly would constitute that.
I know that I don't want any one word responses, I'm thinking at least 4 words - but any college student can tell you that you can express a lot of nothing in many more than 4 words... There have to be more stipulations.
Limitations: I think it would be particularly hard to have the validity of the quote depend on anything outside of itself (in other words, I can't use people's responses to the line of text to gauge whether or not it should be the user's random quote).
Another stipulation: It must not require a lot of work out of the processor. It must be a fairly simple algorithm.
Trueborn
01-19-2009, 05:14 AM
This is where you want to look first:
http://en.wikipedia.org/wiki/Bayes%27_theorem
jheit8
01-20-2009, 02:20 PM
But what if zb3 catches me hitting on a sexy person like Fox or WAN?
NamelessNom4d
01-23-2009, 02:23 AM
I would just make it filter out commonly used words, that way the usual "boring" words wouldn't interest zb3. Perhaps you can get it to notice certain obscure or lulzy words, making it have a higher chance of actually grabbing something funny.
See if you can make zb3 look more closely at anything ending in a question mark. Sometimes the questions people ask in #totse are hilarious. But then, some of them are boring like "how are you?"
Random quotes to analyze?
- [22:35] jheit1: why did you kill a Parrot?
- [22:24] Numberjumbo: i accidentally flooded your vagina
- [22:25] SpectraL: Meta told me he was an IRC Cop
- [22:43] PR_Deltoid: Rave is such a gay word
- [22:43] PR_Deltoid: I squeeze a dump out of my deltoids onto your mom's face
- [22:19] oddballz194: Tesla coils work wonders on RAM and CPUs.
(in no particular order)
I just copypasta'd stuff from #totse, it's really not hard for a person to just go in and look at random text to find something funny.
Things I just looked for:
- length
- abnormal words
- obscene words
-interesting conversations (I doubt zb3 would be able to analyze a conversation though)
I would like to know how to make a chat bot. I always thought it would be funny to make an AIM bot or something that will harass you if you talk to it. Or a troll bot, something that purposefully starts arguments in chat rooms and shit.
-interesting conversations (I doubt zb3 would be able to analyze a conversation though)
This is what I'm working on now :)
What I'm trying to do is create a "funny detector" - a way for the bot to recognize not only WHEN something funny is said, but also pinpoint the line of text that was funny. Now without giving my bot a basic understanding of the English language, there's only one way to do this. That's through directed laughter. Consider the following:
<George> I'm going to go get some chinese food
<Wally> Good idea!
<Jason430> I like to do her from behind so that I can put my laptop on her back
<BeerMan> haha
<Wally> lol
In this instance the bot would have no way of telling who said something funny. It can tell THAT something funny was said (from the "haha" and "lol"), but it doesn't know which line it was.
Now consider:
<George> I'm going to go get some chinese food
<Wally> Good idea!
<Jason> I like to do her from behind so that I can put my laptop on her back
<BeerMan> Jason: haha
<Wally> Jason, lol
Now the bot KNOWS who said the funny line of text. In this fashion, you can train the bot.
I can't think of any other clever way of "finding the funny"
Any ideas?
enkrypt0r
01-24-2009, 04:32 PM
Hmmmm... Well Zok, that's kind of a tricky one, but after mulling it over, I've got some thoughts.
First of all, as you've probably already realized, you can't assume that the 'haha' or 'lol' always immediately follows the joke, because sometimes things can manage to get in between the joke and the response. To counter this, I think the bot should keep track of the length of lines, and calculate how long it would take the average person to read the line in their head. Then, when an 'lol' or 'haha' is detected, see if that message was received at the sum of the time it takes to read the joke and the time it takes to type the response. To put it into an abstract equation, we get:
(Time to takes to read potential joke + Time it takes to reply) - Time that has passed since potential joke ≈ 0
Obviously, this isn't anywhere near foolproof due to a vast amount of factors, but I can think of a couple ways to help narrow it down. If it fulfills the above equation, then the bot could double check by searching the potential joke for certain words that are common in jokes, such as swear words, sexual phrases, or even things like 'chicken' or 'light bulb'. The likelihood of a phrase being a joke also probably increases with exclamation marks.
If you put some more thought into it, I'm sure you can come up with more attributes that jokes generally have. As for jokes that are two-parters, you could use a similar set of rules, only you could search for replies of something like, "What?" or "Why?" in between the joke-teller's messages. For example:
A: "Why did the chicken cross the road?"
B: "Why?"
A: "To get to the other side!"
B: "lol"
As you can see, the bot would detect the 'lol', and perform the calculations. Then it would see that person B asked "Why?" in between two of person A's messages. Person A's first message contains the word 'chicken' which could be a trigger, and their second one contains an exclamation mark. Add all of this up, and the likelihood of person A telling a joke increases. Once it meets a certain number of criteria, the bot can assume person A told a joke.
Obviously, this idea still isn't foolproof, and would be pretty easy to exploit, but it's the best I can come up with at the moment.
Wineblood
03-12-2009, 03:13 AM
I just noticed that out of all the "examples" so far, the best one-liner quotes seem to have more nouns in them, and ignore "stuff"/"thing"/etc. It doesn't require looking at other lines but might require some NLP (http://en.wikipedia.org/wiki/Natural_language_processing), and I can't remember how much processing that needs.
Craigslist.org
03-16-2009, 01:57 PM
Sounds interesting. You should see what Mininova does with their irc channel. They log new uploads in irc. http://www.mininova.org/irc
Not sure if they still do it cuz my ips banned over there. :D But last time I was there they did.
Sounds interesting. You should see what Mininova does with their irc channel. They log new uploads in irc. http://www.mininova.org/irc
Not sure if they still do it cuz my ips banned over there. :D But last time I was there they did.
I actually do something very similar to this. I run a photoblog at http://zok.zoklet.net/otg/ and every time I upload a new picture zb3 will announce it in #totse and in #zok
I also just made a jeopardy trivia function! It's damn fun :)
Craigslist.org
03-20-2009, 11:29 AM
I actually do something very similar to this. I run a photoblog at http://zok.zoklet.net/otg/ and every time I upload a new picture zb3 will announce it in #totse and in #zok
I also just made a jeopardy trivia function! It's damn fun :)
Ya it sounds like it. I wish I could code. :( :D
Clover
05-27-2009, 12:24 PM
This would be extremely easy to do; if you store all lines of text by a person, you could just select the column, where the index = srand($key_min, $key_max); the only issue would be that, there would be a new line every time...unless you only did it once, and then stored that data in the DB permanently. I could achieve this in minutes of coding; it'd be really easy to do.
Dr Gonzo
08-11-2009, 01:53 PM
This could be done in a very efficient manner if an additional button was added to the Zoklet interface.
Next to the 'Thanks' button, there could be an additional button for 'lulz'. Every 30 minutes, or whatever time increment, the bot would select the post with the most 'lulz' points, and pipe it to wherever.
This would rely heavily on users actually clicking the button, however numbers aren't hugely important.
//Alternatively
Most of the time, when someone makes a humorous post, it is quoted several times. Each time it is quoted, their post will usually contain the same keywords. "lol, lulz, rofl, ha, heh, haha..."
Would there be any way of coding zb3 to:
1. Search thread for quotes
2. If the post has been quoted X number of times, scan the posts for keywords.
3. If the posts containing the quote, contain X occurrences of the keywords, then perform the desired function.
Either one of those ideas valid in any way?
vBulletin® v3.8.1, Copyright ©2000-2013, Jelsoft Enterprises Ltd.