Answers.Body: <p>This is still a research topic in linguistics. A quick google search brings up a couple of papers that might be useful:</p>
  <ul>
  <li><a href="https://www.researchgate.net/publication/231608823_Identifying_Metaphor_Hierarchies_in_a_Corpus_Analysis_of_Finance_Articles" rel="nofollow noreferrer">Identifying Metaphor Hierarchies in a Corpus Analysis of Finance Articles</a></li>
  <li><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3639214/" rel="nofollow noreferrer">Metaphor Identification in Large Texts Corpora</a></li>
  </ul>
  <p>However, you probably won't get an off-the-shelf tool that recognises metaphors for you.</p>
  <p>To add more details, the problem with metaphors is that you cannot detect them by surface structure alone. Any sentence could (in theory) be a metaphor. This is different from a <a href="https://www.merriam-webster.com/dictionary/simile" rel="nofollow noreferrer">simile</a>, which can usually be spotted easily through the word <em>like</em>, as in <em>she runs like the wind.</em> Obviously, <em>like</em> on its own is not sufficient, but it's a good starting point to identify possible candidates.</p>
  <p>However, <em>his words cut deeper than a knife</em> is -- on the surface -- a normal sentence. Only the semantic incongruence between <em>words</em> as the subject and <em>cut</em> as the main verb creates a clash. In order to detect this automatically, you need to identify possible semantic features of the verbal roles and look for violations of the expected pattern.</p>
  <p>The verb <em>cut</em> would generally expect an animate object, preferably human, or an instrument with a blade (<em>the knife cuts through the butter</em>) as its actor or subject. But it also can include (water)ways: <em>the canal cuts through the landscape</em>, <em>the road cuts through the field</em>. The more closely you look, the more exceptions/extensions you will find for your initial assumption.</p>
  <p>And every extension/exception will water down the accuracy of your metaphor detection algorithm.</p>
  <p>The second example is similar: <em>Life is a journey</em>. You could perhaps use a thesaurus and see what the <a href="https://en.wikipedia.org/wiki/Hyponymy_and_hypernymy" rel="nofollow noreferrer">hyperonyms</a> of <em>life</em> are. Then you could do the same with <em>journey</em>, and see if they are compatible. <em>A car is a vehicle</em> is not a metaphor, because <em>vehicle</em> is a hyperonym of <em>car</em>. But <em>journey</em> is not a hyperonym of <em>life</em>, so could be a metaphor. But I would think that this is still very tricky to get right. In this case, the absence of a determiner might be a hint, as it's not <em>a life is a journey</em> -- you might restrict yourself to bare nouns for this type of metaphor. But this is also not a firm rule.</p>
  <p>In short, it is a hard problem, as you need to look at the meaning, rather than just the structure or word choice. And meaning is not easy to deal with in NLP, despite decades of work on it.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-14T13:58:23.313Z
Answers.LastActivityDate: 2021-01-15T00:27:06.990Z
Answers.LastEditDate: 2021-01-15T00:27:06.990Z
Answers.UserDisplayName: Oliver Mason
Body: <p>What are the current NLP/NLU techniques that can extract metaphors from texts?</p>
  <p>For example</p>
  <blockquote>
  <p>His words cut deeper than a knife.</p>
  </blockquote>
  <p>Or a simpler form like:</p>
  <blockquote>
  <p>Life is a journey that must be travelled no matter how bad the roads and accommodations.</p>
  </blockquote>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-22T22:15:24.187Z
Comments.Text: Journey is not a hyperonym of life, but it is a part of life. Will this make it a metonymy?
Comments.UserDisplayName: Pomski2
Tags: <machine-learning><natural-language-processing><natural-language-understanding><computational-linguistics>
Title: How to recognise metaphors in texts using NLP/NLU?
UserDisplayName: Younes Ch
ThreadText: # How to recognise metaphors in texts using NLP/NLU?
  
  (Asked by: username_0 on 2019-01-14)
  
  What are the current NLP/NLU techniques that can extract metaphors from texts?
  
  For example
  
  > His words cut deeper than a knife.
  
  Or a simpler form like:
  
  > Life is a journey that must be travelled no matter how bad the roads and accommodations.
  
  **Tags:** machine-learning, natural-language-processing, natural-language-understanding, computational-linguistics
  
  > **Comments:**
  > **username_1**: Journey is not a hyperonym of life, but it is a part of life. Will this make it a metonymy?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-01-14. Score: 3 | Accepted answer
  
  This is still a research topic in linguistics. A quick google search brings up a couple of papers that might be useful:
  
  * [Identifying Metaphor Hierarchies in a Corpus Analysis of Finance Articles](https://www.researchgate.net/publication/231608823_Identifying_Metaphor_Hierarchies_in_a_Corpus_Analysis_of_Finance_Articles)
  * [Metaphor Identification in Large Texts Corpora](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3639214/)
  
  However, you probably won't get an off-the-shelf tool that recognises metaphors for you.
  
  To add more details, the problem with metaphors is that you cannot detect them by surface structure alone. Any sentence could (in theory) be a metaphor. This is different from a [simile](https://www.merriam-webster.com/dictionary/simile), which can usually be spotted easily through the word *like*, as in *she runs like the wind.* Obviously, *like* on its own is not sufficient, but it's a good starting point to identify possible candidates.
  
  However, *his words cut deeper than a knife* is -- on the surface -- a normal sentence. Only the semantic incongruence between *words* as the subject and *cut* as the main verb creates a clash. In order to detect this automatically, you need to identify possible semantic features of the verbal roles and look for violations of the expected pattern.
  
  The verb *cut* would generally expect an animate object, preferably human, or an instrument with a blade (*the knife cuts through the butter*) as its actor or subject. But it also can include (water)ways: *the canal cuts through the landscape*, *the road cuts through the field*. The more closely you look, the more exceptions/extensions you will find for your initial assumption.
  
  And every extension/exception will water down the accuracy of your metaphor detection algorithm.
  
  The second example is similar: *Life is a journey*. You could perhaps use a thesaurus and see what the [hyperonyms](https://en.wikipedia.org/wiki/Hyponymy_and_hypernymy) of *life* are. Then you could do the same with *journey*, and see if they are compatible. *A car is a vehicle* is not a metaphor, because *vehicle* is a hyperonym of *car*. But *journey* is not a hyperonym of *life*, so could be a metaphor. But I would think that this is still very tricky to get right. In this case, the absence of a determiner might be a hint, as it's not *a life is a journey* -- you might restrict yourself to bare nouns for this type of metaphor. But this is also not a firm rule.
  
  In short, it is a hard problem, as you need to look at the meaning, rather than just the structure or word choice. And meaning is not easy to deal with in NLP, despite decades of work on it.
  
  
  ---
  
  