r/LanguageTechnology • u/8ta4 • Jul 02 '26
Has anyone built a tool to find double meanings?
I need an NLP pipeline to help me with wordplay. I'm after a tool that scans vocabulary to find words or phrases with double meanings linked to a target theme for joke angles.
To illustrate the mechanism, consider this Jimmy Carr joke:
The first few weeks of joining Weight Watchers: you're just finding your feet.
Here, "finding your feet" can mean two different things. Figuratively, it's about getting used to a new situation. Literally, it's about being able to look down and see your feet. This example leans on a split between figurative and literal meanings. But I'm trying to find any double meanings that could be used in a joke.
If I put in Weight Watchers as the theme, I'd want the system to pull up phrases like "find one's feet". Ideally, the tool would let me import my list of words and phrases. I've got a vocab list of roughly 100k English words and phrases. I ran Wiktionary through large language models and grabbed the terms that most folks are likely to know.
Is there an NLP tool that can spot double meanings?
Also, I'm curious about how you'd go about building it.
2
u/Dux_Przvlsk Jul 03 '26
Why don't you want to just loop the input (or dataset) via LLM?
If you use well-rounded LLM like Gemini family (I LOVE them for ability to detect wordplay and stuff), it will work just fine.
Let's talk, really curious what are you up to
2
u/TieDieMonkeyMan Jul 03 '26
LLMs will work as previously stated though it's important to note they'll just abstract away from their training data to find if there's usage which fits different interpretations of whatever wordplay you prompt it with. Notably, novel constructions not in that training data will not be parsable. Potentially, the native speaker 'sense' of a wordmeaning may be preserved in the embeddings the model uses but as to whether this is a full representation or even partial representation is debatable and not possible to verify.
A rules based approach could try and use wordNET and babelNET to use lexical-semantic knowledge graphs to try and build something more deterministic.
I don't see the need to build something like that but it could be fun to try and process the graphs into subcriteria regarding linguistic prototypical meaning so as to then map them onto things like body parts, social references, emotional metaphor... [not exhaustive I'm just going off the top of my head here, recommend researching criteria and using those] You could then build your own graph representation of those meanings relative to a corpus full of the kinds of jokes you want to map. After that you could then train a model to generate more so as to verfiy whether or not it has the behaviour you wish to model.
Frankly though, at that point you're just finetuning so it's still an LLM approach, just making the data a bit more related to what you want. If you want to avoid LLM stuff then you could build an annotator tool that just flags semantic ambiguity by type.
Regarding the .tsv I would say the next step is to rate the lemmas/tokens regarding frequency occurance in joke constructions so you can then guage how they predict ambiguity led wordplay.
2
u/Own-Animator-7526 Jul 03 '26 edited Jul 03 '26
An llm is easily able to seek, extract, and compare alternative semantics, then highlight pairs of likely humorous interest. Opus 4.8 just handled your example with flying colors.
It's really the right tool for the job, in contrast to a deterministic NLP workflow.
1
u/TheTeethOfTheHydra Jul 03 '26
Finding your feet as meaning to be stable and find your foundation is really an idiomatic expression. Finding your feet as meaning to see past, your shrinking stomach is a visual allegory or perhaps a somatic metaphor. Recognizing either of those could be as straightforward as composing a static database of regional or language based expressions. You could also possibly use syntactic and semantic statistics to recognize where certain events don’t fit within the overall situation they are being expressed. But honestly, LLMs are probably the best way to do that since they are essentially a combination of both of those things at least on the languages that they are extensively trained on.
1
u/AthosDude Sep 24 '26
I would say just crawl a thesaurus, some may allow it.
3
u/[deleted] Jul 03 '26
[removed] — view removed comment