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?
Artificial Intelligence Stack Exchange is a question and answer site for people interested in conceptual questions about life and challenges in a world where "cognitive" functions can be mimicked in purely digital environment. It only takes a minute to sign up.Sign up to join this community
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)
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.
Have a look at the paper A Modular Architecture for Unsupervised Sarcasm Generation (2019) by Mishra 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's the reference implementation.