UNPKG

@gaiaverse/semantic-turning-point-detector

Version:

Detects key semantic turning points in conversations using recursive semantic distance analysis. Ideal for conversation analysis, dialogue segmentation, insight detection, and AI-assisted reasoning tasks.

539 lines (538 loc) 15 kB
[ { "id": "tp-4-0-0", "label": "Forecasting a Thunderstorm", "category": "question", "span": { "startId": 0, "endId": 0, "startIndex": 0, "endIndex": 0, "originalSpan": { "startId": "meta-cat-0", "endId": "meta-cat-1", "startIndex": 0, "endIndex": 1 } }, "semanticShiftMagnitude": 0.05836562101301253, "keywords": [], "quotes": [ "MR. X: What oppressive heat! We'll surely have a thunder-shower.", "MR. Y: Yes? What makes you think so?", "MR. X: But you always look as if you expected a thunder-shower." ], "emotionalTone": "curiosity", "sentiment": "negative", "detectionLevel": 4, "significance": 1, "complexityScore": 4.758365621013013 }, { "id": "tp-4-0-5", "label": "Weather to Debts", "category": "topic", "span": { "startId": 0, "endId": 5, "startIndex": 0, "endIndex": 5, "originalSpan": { "startId": "meta-cat-2", "endId": "meta-cat-3", "startIndex": 0, "endIndex": 1 } }, "semanticShiftMagnitude": 0.9353630368644178, "keywords": [], "quotes": [ "MR. X: 'What oppressive heat! We'll surely have a thunder-shower.'", "MR. X: 'Nothing but debts, debts!'", "MR. Y: 'Do I?'" ], "emotionalTone": "curiosity", "sentiment": "negative", "detectionLevel": 4, "significance": 1, "complexityScore": 5 }, { "id": "tp-2-5-20", "label": "Debts and Dilemmas", "category": "problem", "span": { "startId": 5, "endId": 20, "startIndex": 5, "endIndex": 20, "originalSpan": { "startId": "meta-cat-2", "endId": "meta-cat-3", "startIndex": 2, "endIndex": 3 } }, "semanticShiftMagnitude": 0.9402544181876001, "keywords": [], "quotes": [ "MR. X: 'Nothing but debts, debts!'", "MR. Y: 'It must be because you are afraid of being found out.'" ], "emotionalTone": "fear", "sentiment": "negative", "detectionLevel": 2, "significance": 1, "complexityScore": 5 }, { "id": "tp-2-5-44", "label": "Moral Dissonance and Identity", "category": "topic", "span": { "startId": 5, "endId": 44, "startIndex": 5, "endIndex": 44, "originalSpan": { "startId": "meta-section-1", "endId": "meta-section-2", "startIndex": 2, "endIndex": 3 } }, "semanticShiftMagnitude": 0.5669871805816289, "keywords": [], "quotes": [ "MR. Y: How did you get such a liberal attitude towards people's conduct? Are you a Christian?" ], "emotionalTone": "curiosity", "sentiment": "positive", "detectionLevel": 2, "significance": 1, "complexityScore": 5 }, { "id": "tp-1-44-48", "label": "Moral Dilemma Unveiled", "category": "insight", "span": { "startId": 44, "endId": 48, "startIndex": 44, "endIndex": 48, "originalSpan": { "startId": "meta-cat-5", "endId": "meta-cat-6", "startIndex": 5, "endIndex": 6 } }, "semanticShiftMagnitude": 0.9794911264378154, "keywords": [], "quotes": [ "MR. Y: How did you get such a liberal attitude towards people's conduct? Are you a Christian?", "MR. X: No--of course I couldn't be--as you've just heard. The Christians demand forgiveness, but I demand punishment for the restoration of balance, or whatever you like to call it, and you, who have served time, ought to understand that." ], "emotionalTone": "curiosity", "sentiment": "negative", "detectionLevel": 1, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-48-49-merged-49-merged-50-merged-52", "label": "reluctant witness Discussion", "category": "decision", "span": { "startId": 48, "endId": 53, "startIndex": 48, "endIndex": 53 }, "semanticShiftMagnitude": 0.8768998865078504, "keywords": [], "quotes": [ "MR. X: I must think about my muddled affairs. Now be so kind as to witness my signature on this note, which I must leave at the bank at Malmö when I go there with you tomorrow morning.", "MR. X: Now be so kind as to witness my signature on this note, which I must leave at the bank at Malmö when I go there with you tomorrow morning.", "MR. Y: I don't intend to go by way of Malmö." ], "emotionalTone": "surprise", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-54-55-merged-55", "label": "The Unveiling of Past Secrets / Misstep Revelation", "category": "insight", "span": { "startId": 54, "endId": 56, "startIndex": 54, "endIndex": 56 }, "semanticShiftMagnitude": 0.8916795102372128, "keywords": [], "quotes": [ "\"No-o. I never sign my name to papers--\" - MR. Y", "\"Any more! That's the fifth time that you have refused to write your name.\" - MR. X", "'Any more! That's the fifth time that you have refused to write your name.' - MR. X" ], "emotionalTone": "curiosity", "sentiment": "positive", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-56-57-merged-60-merged-61", "label": "Reassurance Amidst Doubt / Gesture of Acceptance / The Unequal Footing", "category": "emotion", "span": { "startId": 56, "endId": 62, "startIndex": 56, "endIndex": 62 }, "semanticShiftMagnitude": 0.8528118518520674, "keywords": [], "quotes": [ "MR. Y: Now you hate me.", "MR. X: No.", "But thou art the first to offer me his hand after knowing-- MR. Y" ], "emotionalTone": "curiosity", "sentiment": "positive", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-63-64", "label": "Confession of Unintentional Crime", "category": "emotion", "span": { "startId": 63, "endId": 64, "startIndex": 63, "endIndex": 64 }, "semanticShiftMagnitude": 0.8868314073189378, "keywords": [], "quotes": [ "MR. Y: 'I'm going to tell you, though, and you shall see that I was not a common criminal.'" ], "emotionalTone": "disgust", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-1-65-90", "label": "Revelation of Deceit", "category": "objection", "span": { "startId": 65, "endId": 90, "startIndex": 65, "endIndex": 90, "originalSpan": { "startId": "meta-cat-8", "endId": "meta-cat-9", "startIndex": 0, "endIndex": 1 } }, "semanticShiftMagnitude": 0.9724214813598344, "keywords": [], "quotes": [ "'I see in the mirror that you are a thief, a simple, common thief.' - MR. X", "'So you stole that story too!' - MR. X", "'What do you see now that's so remarkable?' - MR. Y" ], "emotionalTone": "disgust", "sentiment": "negative", "detectionLevel": 1, "significance": 1, "complexityScore": 5 }, { "id": "tp-1-90-110", "label": "Clash Over Accusations and Intent", "category": "clarification", "span": { "startId": 90, "endId": 110, "startIndex": 90, "endIndex": 110, "originalSpan": { "startId": "meta-cat-9", "endId": "meta-cat-10", "startIndex": 1, "endIndex": 2 } }, "semanticShiftMagnitude": 0.9513400091844662, "keywords": [], "quotes": [ "MR. X: 'What do you mean by that last expression--the gold age?'", "MR. Y: 'Nothing at all.'", "MR. Y: 'No? Haven't you?'" ], "emotionalTone": "curiosity", "sentiment": "negative", "detectionLevel": 1, "significance": 1, "complexityScore": 5 }, { "id": "tp-1-110-124", "label": "Fine Imposition and Fear of Consequence", "category": "emotion", "span": { "startId": 110, "endId": 124, "startIndex": 110, "endIndex": 124, "originalSpan": { "startId": "meta-cat-10", "endId": "meta-cat-11", "startIndex": 2, "endIndex": 3 } }, "semanticShiftMagnitude": 0.9780841845226143, "keywords": [], "quotes": [ "MR. Y: 'It is to me that you are to pay the fine.'", "MR. Y: I wouldn't need to be present--and could go." ], "emotionalTone": "surprise", "sentiment": "negative", "detectionLevel": 1, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-125-126", "label": "Power Shift at the Table", "category": "decision", "span": { "startId": 125, "endId": 126, "startIndex": 125, "endIndex": 126 }, "semanticShiftMagnitude": 0.8850737234404872, "keywords": [], "quotes": [ "MR. Y: I only thought--that as I'm not needed--I wouldn't need to be present--and could go.", "MR. X: You cannot. Sit down at your place at the table, where you've been sitting, and we will talk a little." ], "emotionalTone": "fear", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-129-130", "label": "Accusation of Theft", "category": "objection", "span": { "startId": 129, "endId": 130, "startIndex": 129, "endIndex": 130 }, "semanticShiftMagnitude": 0.9420220505641238, "keywords": [], "quotes": [ "MR. X: I see in the mirror that you are a thief, a simple, common thief." ], "emotionalTone": "disgust", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-131-132-merged-132-merged-133", "label": "unveiling Discussion / Sheriff's Impending Arrival", "category": "insight", "span": { "startId": 131, "endId": 134, "startIndex": 131, "endIndex": 134 }, "semanticShiftMagnitude": 0.920140817401863, "keywords": [], "quotes": [ "MR. X: 'If you knew in what need I have lived, and lived, and still live!'", "MR. X: 'To continue, that you have served time is almost certain, but that was in America...'", "'If you knew in what need I have lived, and lived, and still live! But this is no time for that.' - MR. X" ], "emotionalTone": "curiosity", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-134-135-merged-136", "label": "Confrontation and Defeat / Shift from Dismissal to Concern", "category": "emotion", "span": { "startId": 134, "endId": 137, "startIndex": 134, "endIndex": 137 }, "semanticShiftMagnitude": 0.9520181561352429, "keywords": [], "quotes": [ "MR. X: Wait until the sheriff comes and you will know.", "MR. Y: May I go now?", "MR. X: Yes, you may go now." ], "emotionalTone": "defeat", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-140-141", "label": "Intellectual Standoff", "category": "insight", "span": { "startId": 140, "endId": 141, "startIndex": 140, "endIndex": 141 }, "semanticShiftMagnitude": 0.8529158796656315, "keywords": [], "quotes": [ "MR. X: Of course I do, as I am better. I am more intelligent than you are, and of more worth to the common weal.", "MR. Y: You are pretty crafty, but not so crafty as I am. I stand in check myself, but, nevertheless, the next move you can be checkmated." ], "emotionalTone": "pride", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-142-143", "label": "Revelation of Hidden Intentions", "category": "question", "span": { "startId": 142, "endId": 143, "startIndex": 142, "endIndex": 143 }, "semanticShiftMagnitude": 0.913877890713408, "keywords": [], "quotes": [ "MR. X: Shall we have another bout? What evil do you intend to do now?", "MR. Y: That is my secret." ], "emotionalTone": "curiosity", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-144-145", "label": "The Threat of Exposure", "category": "decision", "span": { "startId": 144, "endId": 145, "startIndex": 144, "endIndex": 145 }, "semanticShiftMagnitude": 0.8095495328343505, "keywords": [], "quotes": [ "MR. X: May I look at you?--You think of writing an anonymous letter to my wife, disclosing my secret.", "MR. Y: Yes, and you cannot prevent it. You dare not have me imprisoned, so you must let me go; and when I have gone I can do what I please." ], "emotionalTone": "anger", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-147-148", "label": "Confrontational Insight", "category": "insight", "span": { "startId": 147, "endId": 148, "startIndex": 147, "endIndex": 148 }, "semanticShiftMagnitude": 0.8271067839873484, "keywords": [], "quotes": [ "MR. X: You see, then, there is a difference in people after all" ], "emotionalTone": "anger", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-150-151", "label": "Cowardice Accusation", "category": "emotion", "span": { "startId": 150, "endId": 151, "startIndex": 150, "endIndex": 151 }, "semanticShiftMagnitude": 0.8282617410718549, "keywords": [], "quotes": [ "MR. Y: You were too cowardly, just as you were too cowardly to tell your wife that she is married to a murderer." ], "emotionalTone": "anger", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 }, { "id": "tp-0-152-153-merged-153", "label": "Dismissal with Finality / Immediate Departure Directive", "category": "decision", "span": { "startId": 152, "endId": 154, "startIndex": 152, "endIndex": 154 }, "semanticShiftMagnitude": 0.9399757646153004, "keywords": [], "quotes": [ "Now you shall go--immediately. Your things will follow you.", "MR. X: Now you shall go--immediately. Your things will follow you." ], "emotionalTone": "anger", "sentiment": "negative", "detectionLevel": 0, "significance": 1, "complexityScore": 5 } ]