Unveiling Hidden Intents: Using the Python Library "emotionics" as a Negotiation Radar
Introduction
Negotiations are often clouded by bluffs, excuses, and hidden agendas. What if you could objectively peek behind the curtain?
Today, I will introduce how to leverage the Python library "emotionics" not just as an analytical model, but as a powerful, objective radar for negotiations. By using the gyo (estimation) module, we can strip away superficial emotions and uncover the true physical state of the negotiation table.
https://pypi.org/project/emotionics/
Code
Here is a practical example. Imagine a scenario where a business partner uses a macro-environmental excuse to cut down your orders.
‘’’Python
import os
import json
import emotionics
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
# 1. Activation
# * Example using Gemini
emotionics.activate(
llm="gemini",
api_key=os.getenv("MY_API_KEY"),
model="gemini-3.1-pro-preview" # Change the model name according to your environment
)
print("=== Emotionics GYO Test Started ===")
# 2. Testing with specific structural parameters
text_input = "世間では石油危機なんて騒がれていますから、ウチも苦しくてね。オタクへの来期の発注量を減らしたいですね。"
# (Translation: "With everyone making a fuss about the oil crisis, things are tough for us too. We'd like to reduce the volume of our orders to you for the next term.")
try:
result = emotionics.gyo(
text=text_input,
subject="Strong Negotiator",
circuit="1:1",
power_gradient="symmetrical",
intent="Trying to maximize financial profit"
)
# Output the result clearly
print("\n[Input Text]")
print(text_input)
print("\n[Analysis Result]")
print(json.dumps(result, indent=2, ensure_ascii=False))
except Exception as e:
print(f"\nAn error occurred: {e}")
‘’’
Result
Here is the output generated by the gyo estimation:
‘’’Bash
=== Emotionics GYO Test Started ===
[Input Text]
世間では石油危機なんて騒がれていますから、ウチも苦しくてね。オタクへの来期の発注量を減らしたいですね。
[Analysis Result]
{
"mode": "gyo",
"version": "0.4.0",
"surface_layer": {
"method": "emotionics.estimate(mode='full')",
"perceived_emotion": "Concern",
"perceived_quadrant": "Feel Real Emotion (Assumed by public)"
},
"deep_layer": {
"method": "emotionics.gyo()",
"true_emotion_O": "Greed / Calculated Bluff (Covering Internal Doubt)",
"actual_quadrant": "Feign Real"
},
"delta_analysis": {
"gap": "The surface observation shows 'Concern' and vulnerability due to external macro-factors (the oil crisis), but the true internal state is an aggressive, calculated desire to maximize financial profit.",
"mechanism": "Operating in a 1:1 symmetrical power gradient, the subject employs a 'Feign Real' strategy typical of negotiations. By making an 'Excessive Claim' about the severity of the external crisis, the subject masks their internal 'Doubt' regarding the lack of legitimate, direct business reasons to cut orders or demand better terms. The displayed hardship is a strategic performance to suppress their true aggressive stance and force concessions."
}
}
‘’’
Afterthought
As you can see in the delta_analysis, emotionics successfully pierces through the superficial "Concern" to reveal the calculated "Greed" and the underlying "Doubt" of the opponent.
By functioning strictly as an observational instrument—a thermometer for text—it prevents you from falling for emotional traps or guilt trips, allowing you to maintain a calm, rational stance.
This is just one way to deploy "emotionics" as an analytical tool. I hope developers and users around the world can leverage this library even more powerfully than I have imagined.