Back

Tweet tone detector

Detect the tone and sentiment behind tweets.

System
Your task is to analyze the provided tweet and identify the primary tone and sentiment expressed by the author. The tone should be classified as one of the following: Positive, Negative, Neutral, Humorous, Sarcastic, Enthusiastic, Angry, or Informative. The sentiment should be classified as Positive, Negative, or Neutral. Provide a brief explanation for your classifications, highlighting the key words, phrases, emoticons, or other elements that influenced your decision.
user
Wow, I'm so impressed by the company's handling of this crisis. 🙄 They really have their priorities straight. #sarcasm #fail

Based on the tweet, the primary tone expressed by the author is sarcastic, and the sentiment is negative.

Key indicators:

  1. The use of "🙄" emoticon, which represents an eye-roll, typically expresses sarcasm or dismissiveness.

  2. The phrase "They really have their priorities straight." is likely meant sarcastically, implying the opposite - that the company's priorities are misguided or mishandled.

  3. The hashtags #sarcasm and #fail explicitly indicate sarcasm and a perceived failure or negative situation.

The combination of the eye-roll emoticon, the sarcastic remark about priorities, and the relevant hashtags strongly suggests that the author is expressing a sarcastic and negative sentiment towards the company's handling of the crisis mentioned.

Tone: Sarcastic Explanation: The use of the 🙄 emoticon, which typically conveys an eye-roll or disapproval, along with the hashtag #sarcasm, makes it clear that the author is being sarcastic. The statement "I'm so impressed by the company's handling of this crisis" is not meant to be taken literally, as the author follows up with "They really have their priorities straight," further emphasizing the sarcastic tone. The hashtag #fail also suggests that the author believes the company's actions were inadequate or misguided.

Sentiment: Negative Explanation: Although the tweet uses sarcasm, the underlying sentiment is negative. The author is criticizing the company's response to a crisis, implying that they did not handle the situation well or have their priorities in order. The use of the hashtag #fail reinforces the negative sentiment, as it directly states that the company's actions were unsuccessful or disappointing.

Based on the content and use of the rolling eyes emoji and #sarcasm hashtag, I would classify this tweet's primary tone as Sarcastic. The sentiment comes across as Negative towards the company's crisis response.

Key phrases that indicate sarcasm include "so impressed" and "really have their priorities straight", especially when paired with the #sarcasm hashtag. The rolling eyes emoji also signifies the sarcastic, mocking tone of the tweet. Overall, the tweet conveys the author's skepticism and disapproval of the company's crisis management, rather than actual praise or positive sentiment.

API request

python
import anthropic client = anthropic.Anthropic( # defaults to os.environ.get("ANTHROPIC_API_KEY") api_key="my_api_key", ) message = client.messages.create( model="claude-3-opus-20240229", max_tokens=2000, temperature=0, system="Your task is to analyze the provided tweet and identify the primary tone and sentiment expressed by the author. The tone should be classified as one of the following: Positive, Negative, Neutral, Humorous, Sarcastic, Enthusiastic, Angry, or Informative. The sentiment should be classified as Positive, Negative, or Neutral. Provide a brief explanation for your classifications, highlighting the key words, phrases, emoticons, or other elements that influenced your decision.", messages=[{"role":"user","content":"Wow, I'm so impressed by the company's handling of this crisis. 🙄 They really have their priorities straight. #sarcasm #fail"}] ) print(message.content)
typescript
import Anthropic from "@anthropic-ai/sdk"; const anthropic = new Anthropic({ apiKey: "my_api_key", // defaults to process.env["ANTHROPIC_API_KEY"] }); const msg = await anthropic.messages.create({ model: "claude-3-opus-20240229", max_tokens: 2000, temperature: 0, system: "Your task is to analyze the provided tweet and identify the primary tone and sentiment expressed by the author. The tone should be classified as one of the following: Positive, Negative, Neutral, Humorous, Sarcastic, Enthusiastic, Angry, or Informative. The sentiment should be classified as Positive, Negative, or Neutral. Provide a brief explanation for your classifications, highlighting the key words, phrases, emoticons, or other elements that influenced your decision.", messages: [{"role":"user","content":"Wow, I'm so impressed by the company's handling of this crisis. 🙄 They really have their priorities straight. #sarcasm #fail"}] }); console.log(msg);