Answers.Body: <p>A simple form of sarcasm involves a direct reversal of the literal meaning of the statement, eg "Great weather we're having" (during a thunderstorm), "just what I needed" (when something goes wrong).</p>
  
  <p>The problem with doing this in random sentences is that you may have no context to establish the reversal of the literal meaning.</p>
  
  <p>You could possibly construct them by using a template along the lines of "Just what I needed - (random bad thing happened) today"</p>
  
  <p>Or, when an outcome of a process is calculated, if it is not the desired outcome, instead of returning "mission unsuccessful" or "mission not yet complete", the AI could say "you're having a great day, aren't you? - mission unsuccessful" or "great work, genius - mission not yet complete".</p>
  
  <p>Most random sentences will not be suitable for sarcasm, so it could only be applied in specific circumstances. </p>
  
  <p>It is not clear from your question what the context is for these random sentences, and therefore it is not clear whether that context would be suitable for sarcasm at all.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T03:33:44.610Z
Answers.LastActivityDate: 2017-01-19T03:33:44.610Z
Answers.UserDisplayName: Jnani Jenny Hale
Answers.Body: <p>Have a look at the paper <a href="https://www.aclweb.org/anthology/D19-1636/" rel="nofollow noreferrer">A Modular Architecture for Unsupervised Sarcasm Generation</a> (2019) by <a href="https://abhijitmishra.github.io/#about" rel="nofollow noreferrer">Mishra</a> et al. </p>
  
  <p>In the abstract, the authors write</p>
  
  <blockquote>
    <p>In this paper, we propose a novel framework for sarcasm generation; the system takes a literal negative opinion as input and translates it into a sarcastic version. Our framework does not require any paired data for training.</p>
  </blockquote>
  
  <p><a href="https://github.com/TarunTater/sarcasm_generation" rel="nofollow noreferrer">Here</a>'s the reference implementation.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-09T16:53:01.080Z
Answers.LastActivityDate: 2020-03-09T16:53:01.080Z
Answers.UserDisplayName: nbro
Answers.Body: <p>You could also build a database of sarcastic sentences, especially from, for example historic plays. And then train your software to recognize patterns of those sentences.</p>
  
  <p>E.g. grammatical constructions/order, length (or circomstances building up to the sarcasm). </p>
  
  <p>And use that database as starting point, with feedback to learn, or you could use the above method to improve your effective output.</p>
  
  <p>Another approach would be to use a similar but reverse approach; study those databases and build an equivalent output based on the coherence, and then extrapolate the output-generation procedure. (In combination with other methods)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-19T11:56:04.317Z
Answers.LastActivityDate: 2017-01-19T13:00:59.110Z
Answers.LastEditDate: 2017-01-19T13:00:59.110Z
Answers.UserDisplayName: a.t.
Body: <p>I am currently working on an Android AI app. </p>
  
  <p>I am aware of AI models to generate random sentences. However, is there an AI model for generating sarcastic sentences?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-17T09:03:42.573Z
Comments.Text: Recognizing and interpreting sarcasm is often a difficult task even for humans to comprehend; since you can learn only the things you can recognize I don't see valid ways to accomplish your task.
Comments.UserDisplayName: Lovecraft
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-17T09:11:27.143Z
Comments.Text: Well, if you dive in and take a closer look, we see that ironic statements are the most likely to be sarcastic. So, instead; is there any way to produce random ironic statements?
Comments.UserDisplayName: Praharsh Bhatt
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-17T10:39:16.553Z
Comments.Text: You can use `Generative models` such as NB (Naive Bayes) and use probability using a big corpus for generating random sentences with n grams
Comments.UserDisplayName: ᴀʀᴍᴀɴ
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-19T21:53:22.330Z
Comments.Text: I recommend researching the concept of the "backhanded compliment" and the comedy of [Don Rickles](https://en.wikipedia.org/wiki/Don_Rickles), widely regarded as the exemplar of the form, for inspiration.  (And please keep us apprised of your progress.  Having a sarcastic computer assistant is something of a dream of mine.)
Comments.UserDisplayName: DukeZhou
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-01-20T02:41:16.257Z
Comments.Text: @DukeZhou My team is developing AI for Android here: https://play.google.com/store/apps/details?id=com.multiverse.jarvis That's where we want to implement the algorithm.
Comments.UserDisplayName: Praharsh Bhatt
Tags: <machine-learning><natural-language-processing><reference-request>
Title: Is there an AI model for generating sarcastic sentences?
UserDisplayName: Praharsh Bhatt
ThreadText: # Is there an AI model for generating sarcastic sentences?
  
  (Asked by: username_0 on 2017-01-17)
  
  I am currently working on an Android AI app.
  
  I am aware of AI models to generate random sentences. However, is there an AI model for generating sarcastic sentences?
  
  **Tags:** machine-learning, natural-language-processing, reference-request
  > **Comments:**
  > **username_1**: Recognizing and interpreting sarcasm is often a difficult task even for humans to comprehend; since you can learn only the things you can recognize I don't see valid ways to accomplish your task.  
  > **username_0**: Well, if you dive in and take a closer look, we see that ironic statements are the most likely to be sarcastic. So, instead; is there any way to produce random ironic statements?  
  > **username_2**: You can use `Generative models` such as NB (Naive Bayes) and use probability using a big corpus for generating random sentences with n grams  
  > **username_3**: I recommend researching the concept of the "backhanded compliment" and the comedy of [Don Rickles](https://en.wikipedia.org/wiki/Don_Rickles), widely regarded as the exemplar of the form, for inspiration.  (And please keep us apprised of your progress.  Having a sarcastic computer assistant is something of a dream of mine.)  
  > **username_0**: @DukeZhou My team is developing AI for Android here: https://play.google.com/store/apps/details?id=com.multiverse.jarvis That's where we want to implement the algorithm.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_6 on 2017-01-19. Score: 2 | Accepted answer
  
  You could also build a database of sarcastic sentences, especially from, for example historic plays. And then train your software to recognize patterns of those sentences.
  
  E.g. grammatical constructions/order, length (or circomstances building up to the sarcasm).
  
  And use that database as starting point, with feedback to learn, or you could use the above method to improve your effective output.
  
  Another approach would be to use a similar but reverse approach; study those databases and build an equivalent output based on the coherence, and then extrapolate the output-generation procedure. (In combination with other methods)
  
  
  ---
  
  ### Answer by username_4 on 2017-01-19. Score: 8
  
  A simple form of sarcasm involves a direct reversal of the literal meaning of the statement, eg "Great weather we're having" (during a thunderstorm), "just what I needed" (when something goes wrong).
  
  The problem with doing this in random sentences is that you may have no context to establish the reversal of the literal meaning.
  
  You could possibly construct them by using a template along the lines of "Just what I needed - (random bad thing happened) today"
  
  Or, when an outcome of a process is calculated, if it is not the desired outcome, instead of returning "mission unsuccessful" or "mission not yet complete", the AI could say "you're having a great day, aren't you? - mission unsuccessful" or "great work, genius - mission not yet complete".
  
  Most random sentences will not be suitable for sarcasm, so it could only be applied in specific circumstances.
  
  It is not clear from your question what the context is for these random sentences, and therefore it is not clear whether that context would be suitable for sarcasm at all.
  
  
  ---
  
  ### Answer by username_5 on 2020-03-09. Score: 2
  
  Have a look at the paper [A Modular Architecture for Unsupervised Sarcasm Generation](https://www.aclweb.org/anthology/D19-1636/) (2019) by [Mishra](https://abhijitmishra.github.io/#about) et al.
  
  In the abstract, the authors write
  
  > In this paper, we propose a novel framework for sarcasm generation; the system takes a literal negative opinion as input and translates it into a sarcastic version. Our framework does not require any paired data for training.
  
  [Here](https://github.com/TarunTater/sarcasm_generation)'s the reference implementation.
  
  
  ---
  
  