Last active
June 1, 2016 08:29
-
-
Save loretoparisi/890b1bdaa84498becbc447f5845a012e to your computer and use it in GitHub Desktop.
IBM Watson Tone Analyzer Example of JSON Response with document and sentences levels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"document_tone": { | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.246262, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.295264, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.207574, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.106589, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.568739, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.664, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0.404, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.001, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.012, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.972, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.973, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0.978, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
}, | |
"sentences_tone": [ | |
{ | |
"sentence_id": 0, | |
"text": "Baby I like your style", | |
"input_from": 0, | |
"input_to": 22, | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.08914, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.099822, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.064455, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.751385, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.253702, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0.839, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.058, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.996, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.995, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0.782, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
}, | |
{ | |
"sentence_id": 1, | |
"text": "Grips on your waist", | |
"input_from": 24, | |
"input_to": 43, | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.255369, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.319806, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.263693, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.217074, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.161427, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.022, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.932, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.995, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.993, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
}, | |
{ | |
"sentence_id": 2, | |
"text": "Front way, back way", | |
"input_from": 45, | |
"input_to": 64, | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.139227, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.189461, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.348021, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.235454, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.312419, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.817, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.571, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.157, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.012, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0.401, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
}, | |
{ | |
"sentence_id": 3, | |
"text": "You know that I don't play", | |
"input_from": 66, | |
"input_to": 92, | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.192519, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.262722, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.29348, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.116043, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.479006, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.905, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.016, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.968, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.962, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0.942, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
}, | |
{ | |
"sentence_id": 4, | |
"text": "Streets not safe", | |
"input_from": 94, | |
"input_to": 110, | |
"tone_categories": [] | |
}, | |
{ | |
"sentence_id": 5, | |
"text": "But I never run away", | |
"input_from": 112, | |
"input_to": 132, | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.267019, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.15424, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.336627, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.091251, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.617186, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0.987, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.011, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.001, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.423, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.749, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0.998, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
}, | |
{ | |
"sentence_id": 6, | |
"text": "Even when I'm away", | |
"input_from": 134, | |
"input_to": 152, | |
"tone_categories": [ | |
{ | |
"tones": [ | |
{ | |
"score": 0.398987, | |
"tone_id": "anger", | |
"tone_name": "Anger" | |
}, | |
{ | |
"score": 0.323644, | |
"tone_id": "disgust", | |
"tone_name": "Disgust" | |
}, | |
{ | |
"score": 0.216245, | |
"tone_id": "fear", | |
"tone_name": "Fear" | |
}, | |
{ | |
"score": 0.039136, | |
"tone_id": "joy", | |
"tone_name": "Joy" | |
}, | |
{ | |
"score": 0.487616, | |
"tone_id": "sadness", | |
"tone_name": "Sadness" | |
} | |
], | |
"category_id": "emotion_tone", | |
"category_name": "Emotion Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0, | |
"tone_id": "analytical", | |
"tone_name": "Analytical" | |
}, | |
{ | |
"score": 0, | |
"tone_id": "confident", | |
"tone_name": "Confident" | |
}, | |
{ | |
"score": 0.968, | |
"tone_id": "tentative", | |
"tone_name": "Tentative" | |
} | |
], | |
"category_id": "language_tone", | |
"category_name": "Language Tone" | |
}, | |
{ | |
"tones": [ | |
{ | |
"score": 0.052, | |
"tone_id": "openness_big5", | |
"tone_name": "Openness" | |
}, | |
{ | |
"score": 0.524, | |
"tone_id": "conscientiousness_big5", | |
"tone_name": "Conscientiousness" | |
}, | |
{ | |
"score": 0.028, | |
"tone_id": "extraversion_big5", | |
"tone_name": "Extraversion" | |
}, | |
{ | |
"score": 0.643, | |
"tone_id": "agreeableness_big5", | |
"tone_name": "Agreeableness" | |
}, | |
{ | |
"score": 0.984, | |
"tone_id": "emotional_range_big5", | |
"tone_name": "Emotional Range" | |
} | |
], | |
"category_id": "social_tone", | |
"category_name": "Social Tone" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While the json result showed here has no
sentences_tone
, due to a different formatting of the input text (no period, less of double end-of-line character) like:See here for details.