Pun generator

Pun Generation with Surprise

This repo contains code and data for the paper Pun Generation with Surprise.


  • Pretrained WikiText-103 model from Fairseq


Word relatedness model

We approximate relatedness between a pair of words with a long-distance skip-gram model trained on BookCorpus sentences. The original BookCorpus data is parsed by and you can see the sample file in .

Preprocess bookcorpus data:

Train skip-gram model:

Edit model

The edit model takes a word and a template (masked sentence) and combine the two coherently.

Preprocess data:



Build a sentence retriever based on Bookcorpus. The input should have a tokenized sentence per line.

Analyze what makes a pun funny

Compute correlation between local-global suprise scores and human funniness ratings. We provide our annotated dataset in :

  • : sentences annotated with funniness scores from 1 to 5.
  • : the same data where scores are standardized for each annotator.

Generate puns

We generate puns given a pair of pun word and alternative word. We support pun generation with the following methods specified by the argument.

  • : the SURGEN method described in the paper
  • : in the last step of SURGEN, use a neural combiner to edit the topic words
  • : retrieve a sentence containing the pun word
  • : retrieve a sentence containing the alternative word and replace it with the pun word For arguments controlling the neural generator (e.g., , ), see . All results and logs are saved in .


If you use the annotated SemEval pun dataset, please cite our paper:

Sours: https://github.com/hhexiy/pungen

Pick-up lines by name

Updated 10/25/2016 by Patook (originally published 11/15/2015)

What's this? this name pun generator is a demo of the technology used behind Patook's flirt detector algorithm. Part of the below was used to build our pick-up line detector which prevents Patook users from flirting with one another.

Please enter the name of the person in the field below:

Show NSFW pick-up lines (I am 18 or older)

Name: Noelle
Author: casey0315
Votes: 6962
Text: My favorite thing to do is cudde and watch Netfix.
It's like cuddling and watching Netflix, but with Noelle.

Submit your own HERE

Most queried names:
Emily- Sophie- Hannah- Emma- Anna- Maria- Kate- Lauren- Jessica- Amy- Julia- Ellie- Kelsey- Kayla- Abby- Megan- Laura

We went through the top submissions of pick-up lines on Reddit, in particular /r/Tinder, /r/OKCupidand /r/Seductionand identified those that were puns based on the user's name. More details about the technical stuff below.

Tech details: we crawled the top 1,000 submissions per week for the past 10 weeks, then top top 1,000 submissions of all time. Most of them were imgur images of various dating websites so we built pattern detectors for each of those websites. Then we ran the text through Optical Character Recognition (OCR). Once that was done we looked for text that looked like it was based on the user's name (e.g. "Tinder name puns"). Please contact us at info at this domain for more info or to report issues.

If you're not really into cheesy pick-up lines and online dating, Patookis a new website/app that's geared towards making platonic friends and communicating with the community. Give it a shot and let us know your feedback!

Reddit is a registered mark of Reddit Inc.

Sours: https://patook.com/Blog/PULines
  1. Chevrolet ss carmax
  2. Automation staffing
  3. 4runner skid plate
  4. Nissan dealer elkhart

This AI Is Spitting Out Coherent, Almost-Funny Dad Puns

AI won't be writing our comedy specials quite yet — but maybe some day.

Pun Generator

Imagine you tell your dad something about a negotiator, or a car. Just enough material for him to land an appalling pun:

That’s because [the] negotiator got my car back to me in one peace.

But this is the work of no dad. Instead, it was created by a pun-generating artificial intelligence, created by Stanford researchers to prove that a neural network can have a sense of humor, too. The results were hilarious, but not always in the way you’d expect. Some of these knee-slappers were barely coherent — but they might provide a preview of what happens when AI starts to become funny.


A preprint of the research, published in the journal arXiv last month, describes how the researchers fed pairs of homophones — like “two” and “too” — to a neural network.

The results often had an almost-there quality that’ll be familiar to close watchers of AI-generated text. Here’s an example: Even from the outside, I could tell that he’d already lost some wait.

Not Funny

There are plenty of challenges that remain.

Neural networks “are rule-abiding to a fault, and that makes them terrible jokers,” writes Wired.

In an organized pun-off against competing human jokesters, the machine was rated to be funnier than a human just ten percent of the time.

“While we improve beyond current techniques, we are still far from human-generated puns,” concludes the prewrite. Neural networks tend to conflate creativity with nonsense — which remains a “big challenge in humor.”

READ MORE: The Comedian Is in the Machine. AI Is Now Learning Puns [Wired]

More on machine learning:Machine Learning Is Giving Retro Games Cutting-Edge Graphics

Care about supporting clean energy adoption? Find out how much money (and planet!) you could save by switching to solar power at UnderstandSolar.com. By signing up through this link, Futurism.com may receive a small commission.

Sours: https://futurism.com/the-byte/ai-pun-generator

Name Your Next Project With This Pun Generator

At Gizmodo Media, Lifehacker’s parent company, we love a portmanteau. A lot of our sister sites, as well as their subdomains, are combinations of existing words: Deadspin evokes backspin but also ESPN; Gizmodo contains gizmo and mod. Lifehacker’s subsites find a second meaning within a word or phrase: Skillet contains skill, Two Cents is money advice. We’ve covered some great tools for inventing pun names before. Now there’s Entendrepreneur, a powerful tool for combining any two concepts into a portmanteau or a rhyme.

Image for article titled Name Your Next Project With This Pun Generator

Enter two words into Entendrepreneur, and it will look for related words for both of them. Then it will try to match up those words, using any overlapping syllables to make a portmanteau. It also lists rhyming word pairs, which are a little easier to mentally process. Either way, you can find a clever name for your website, product, business, or other project.

For example, say you want to pitch my services as a handyman, a home expert, some sort of Dr. Fix-it. Repair and expert gives you the succinct fixpert.

Maybe you’ve invented a water bottle optimized for athletes. Exercise plus water gives you Trainwater, Jogua (jog and agua!), or the rhyme Train Rain.

G/O Media may get a commission

Clearstem Clear Kit

Save $35

Clearstem Clear Kit

Target breakouts and wrinkles at the same time
Each item is also free of all possible pore-cloggers and contains zero hormone disruptors.

You’ll also get a lot of unwieldy or irrelevant combos—treadmillectricity, prerogativeaporation—but Entenrepreneur usually ranks the shorter, relevant words highest.

What’s particularly powerful about this tool is that it finds related words on its own. It covers much more ground than if you needed to look up each specific word. If you come up with a word list first, and try all the combinations you can think of, you’ll get a wide range of options.

If you spend enough time doing this, you’ll lose your grip on common sense and language, adrift on a sea of syllables. Once you’ve found your top contenders, run them by some other people immediately. Don’t give yourself time to fall in love with a too-clever portmanteau, or else you’ll be devastated when someone reacts to it with, “I don’t get it.”

Entendrepreneur Portmanteau and Rhyme Generator (via MetaFilter)

Sours: https://lifehacker.com/name-your-next-project-with-this-pun-generator-1832939093

Generator pun



Similar news:


657 658 659 660 661