Unfortunately, it's not so easy, or anything random would be funny, but we know that's not likely.
Though unpredictability is key, comedy also has some other characteristics, like (depending on the style of comedy) like wit or a commentary on something familiar that is shown in a new light. Some types of comedy (like caricature) exaggerate characteristics, or play on someone's suffering (the old slip on a bannana peel gag), sometimes it breaks taboos or says uncomfortable truths, etc...
There's a lot of literature out there analyzing what makes something funny. Maybe there's some way of integrating some of these insights in to a NLP system, or have it focus on some of those.