├── IEMOCAP ├── dev_data.json ├── name_pool ├── test_data.json └── train_data.json ├── MELD ├── dev_sent_emo.csv ├── test_sent_emo.csv └── train_sent_emo.csv ├── README.md ├── clean.sh ├── config.py ├── data_process.py ├── emorynlp ├── emotion-detection-dev.json ├── emotion-detection-trn.json └── emotion-detection-tst.json ├── friends_transcript.json ├── model.py ├── plots ├── plot.py ├── plot_dif.py └── plot_selection.py ├── relations ├── requirements.txt ├── spcl.png ├── spcl_loss.py ├── speakers ├── speakers_desc ├── train.py └── util_methods.py /IEMOCAP/name_pool: -------------------------------------------------------------------------------- 1 | ["Roy", "Weldon", "Zachariah", "young", "York", "Yates", "xavier", "wyatt", "Wray", "Worthington", "woodward", "woods", "woodruff", "woodrow", "wood", "wolfe", "wolf", "Witt", "winston", "winslow", "Winfred", "wilton", "Wilson", "Willoughby", "willis", "Williamson", "william", "willard", "will", "Wilkinson", "Wilfred", "wilder", "wilbur", "Wilbert", "Whittaker", "Whitmore", "Whitlock", "Whitfield", "whitehead", "wheeler", "weston", "Westbrook", "west", "wesley", "wendell", "Weldon", "Webster", "weber", "Webber", "Webb", "Wayne", "Watts", "watt", "watkins", "washington", "Washburn", "warren", "warner", "ware", "ward", "Walton", "Walter", "Waller", "wallace", "wall", "walker", "Waldron", "waldo", "Walden", "Waite", "wade", "Virgil", "Vinson", "Vincent", "vince", "victor", "Vicente", "Vernon", "vance", "van", "Ulysses", "Tyson", "tyler", "Truman", "troy", "Tripp", "Trevor", "Trent", "Travis", "Townsend", "tom", "Todd", "tod", "toby", "Tobin", "Tobias", "titus", "Timothy", "tim", "thurston", "Thurman", "thorpe", "Thorne", "Thomas", "theodore", "Theo", "Thaddeus", "Thad", "Terrence", "Terrell", "Terrance", "Terence", "temple", "teddy", "ted", "Teague", "Tate", "tanner", "Tandy", "Tammie", "TAM", "Talbot", "sylvester", "swift", "Sweeney", "swain", "sutton", "sutherland", "sumner", "Sullivan", "Stuart", "strong", "Stoner", "stone", "Stoddard", "Stewart", "steward", "Stevie", "stevenson", "Steven", "steve", "stern", "sterling", "Stephenson", "Stephen", "stein", "stanton", "Stanley", "Stanford", "stan", "springer", "Sprague", "Spencer", "Solomon", "sol", "smith", "Sloan", "slater", "Sinclair", "Simon", "Simms", "silas", "sid", "Shipley", "sherwood", "Sherman", "sheridan", "Sheppard", "shepherd", "Shepard", "Shelton", "sheldon", "sheffield", "Sheehan", "Shawn", "Shaw", "Shannon", "shane", "seymour", "sexton", "Sewell", "Seth", "Sellers", "sebastian", "sean", "Scott", "Scales", "sawyer", "Saul", "sanford", "Sanderson", "Samuel", "Sampson", "sammy", "Sammie", "Sam", "Rutledge", "rutherford", "russell", "Russel", "russ", "rush", "Rupert", "rufus", "ruff", "rudy", "Rudolph", "Rudolf", "rudd", "royal", "Roy", "Rowley", "rowland", "Rowell", "Rowe", "rowan", "Roth", "roscoe", "Rory", "roper", "Roosevelt", "Rooney", "Ronald", "Ron", "romeo", "Roman", "Rollins", "Rolland", "rolf", "roland", "roger", "roe", "rodney", "Rodgers", "rodger", "Roderick", "rod", "rock", "robert", "robbin", "Robbie", "rob", "Rivers", "Ritchie", "ring", "rick", "Richmond", "Richie", "rich", "Rhodes", "Zola", "Zoe", "Zenobia", "Zenia", "Zena", "Zandra", "yvonne", "Yvette", "yolande", "Xenia", "Winnie", "Winifred", "wilma", "wilhelmina", "wendy", "wanda", "Vivien", "Virginia", "violet", "viola", "Vida", "victoria", "vicky", "Vickie", "Vicki", "Vesta", "veronica", "Verena", "vera", "Venus", "vanessa", "valerie", "Valeria", "Ursula", "Una", "trudy", "Torrie", "Toni", "Tina", "Tillie", "tilda", "tiffany", "Thomasina", "Theresia", "theresa", "Theodora", "thelma", "Thea", "thalia", "tessie", "tessa", "Tess", "Teresa", "Tatum", "tanya", "tania", "tabitha", "Sylvia", "sybil", "Suzanne", "Suzan", "Susy", "susie", "Susannah", "Susanna", "Susan", "sunny", "sue", "Stephanie", "stella", "spring", "Sophie", "Sophia", "Sonya", "Sonia", "snow", "Silvia", "silver", "Sigrid", "sibyl", "Shona", "Shirley", "Shera", "sheila", "serena", "selma", "Selina", "Selene", "Selena", "Scarlett", "scarlet", "Sarah", "sara", "Sandra", "salome", "sally", "Sallie", "sal", "sage", "sadie", "sabine", "sabina", "ruth", "ruby", "rowena", "rosita", "Rosina", "Rosie", "rosetta", "rosemary", "Rosemarie", "Roseanne", "Roseanna", "rose", "Rosanna", "Rosamond", "Rosaline", "Rosalind", "rosalie", "Rosalia", "rosa", "romaine", "Roma", "roberta", "Rita", "Ricarda", "rhoda", "rhea", "Renee", "renata", "Rena", "Regina", "Reese", "rebekah", "Rebecca", "Reba", "Rea", "raven", "Ramona", "Rae", "Rachel", "queenie", "prudence", "Priscilla", "porsche", "polly", "phyllis", "Phoebe", "Philomena", "Phillis", "petty", "penny", "Pennie", "Penney", "Penelope", "peggy", "Peggie", "peg", "pearl", "Paz", "pauline", "Paulina", "Paula", "patty", "Pattie", "Patti", "patricia", "patience", "pansy", "Pandora", "Pamela", "pam", "Paige", "Ophelia", "opal", "Olympia", "Olivia", "olive", "Olga", "Odette", "Octavia", "norma", "Norene", "Noreen", "Norah", "nora", "nona", "Nola", "nita", "nina", "Nicolette", "nicole", "Nicola", "Nettie", "nelly", "nellie", "nell", "Nathalie", "Natalie", "natalia", "Naomi", "Nannie", "Nanette", "nancy", "nana", "nan", "Nadine", "myrtle", "myra", "monica", "Monet", "Mona", "molly", "Mollie", "Moira", "Miriam", "Miranda", "minnie", "minna", "minerva", "mina", "Milly", "millie", "Millicent", "Mildred", "mignon", "Michelle", "Michaela", "meta", "merry", "mercy", "Mercedes", "melody", "melissa", "Melba", "Melanie", "meg", "may", "maxine", "mavis", "Maureen", "Maura", "Maude", "Maud", "Matilda", "Mathilda", "mary", "marvel", "Martha", "Marnie"] -------------------------------------------------------------------------------- /MELD/dev_sent_emo.csv: -------------------------------------------------------------------------------- 1 | Sr No.,Utterance,Speaker,Emotion,Sentiment,Dialogue_ID,Utterance_ID,Season,Episode,StartTime,EndTime 2 | 1,"Oh my God, he’s lost it. He’s totally lost it.",Phoebe,sadness,negative,0,0,4,7,"00:20:57,256","00:21:00,049" 3 | 2,What?,Monica,surprise,negative,0,1,4,7,"00:21:01,927","00:21:03,261" 4 | 3,"Or! Or, we could go to the bank, close our accounts and cut them off at the source.",Ross,neutral,neutral,1,0,4,4,"00:12:24,660","00:12:30,915" 5 | 4,You’re a genius!,Chandler,joy,positive,1,1,4,4,"00:12:32,334","00:12:33,960" 6 | 5,"Aww, man, now we won’t be bank buddies!",Joey,sadness,negative,1,2,4,4,"00:12:34,211","00:12:37,505" 7 | 6,"Now, there’s two reasons.",Chandler,neutral,neutral,1,3,4,4,"00:12:38,466","00:12:39,841" 8 | 7,Hey.,Phoebe,neutral,neutral,1,4,4,4,"0:12:43,012","0:12:44,074" 9 | 8,Hey!,All,joy,positive,1,5,4,4,"0:12:44,074","0:12:45,189" 10 | 9,"Ohh, you guys, remember that cute client I told you about? I bit him.",Phoebe,neutral,neutral,1,6,4,4,"00:12:45,347","00:12:50,852" 11 | 10,Where?!,Rachel,surprise,negative,1,7,4,4,"0:12:52,730","0:12:55,002" 12 | 11,On the touchy.,Phoebe,neutral,neutral,1,8,4,4,"0:12:55,002","0:12:55,824" 13 | 12,And,Ross,neutral,neutral,1,9,4,4,"00:12:56,025","00:12:58,193" 14 | 13,"No, I know!",Phoebe,surprise,negative,1,10,4,4,"00:12:59,195","00:13:01,863" 15 | 14,"I-I’m sorry, but the moment I touch him, I just wanna throw out my old oath and take a new, dirty one.",Phoebe,anger,negative,1,11,4,4,"00:12:59,195","00:13:10,163" 16 | 15,"Well, next time your massaging him, you should try and distract yourself.",Monica,neutral,neutral,1,12,4,4,"00:13:07,495","00:13:16,044" 17 | 16,Yeah! Yeah! Yeah! Like-like when I’m doing something exciting and I don’t wanna get,Joey,joy,positive,1,13,4,4,"00:13:10,372","00:13:17,712" 18 | 17,"Thank you, Joey.",Chandler,neutral,neutral,1,14,4,4,"0:13:29,391","0:13:30,483" 19 | 18,"No-no, thank you.",Joey,neutral,neutral,1,15,4,4,"0:13:30,483","0:13:31,611" 20 | 19,"Hey Estelle, listen",Joey,neutral,neutral,2,0,6,4,"00:08:53,241","00:08:57,224" 21 | 20,Well! Well! Well! Joey Tribbiani! So you came back huh? They,Estelle,surprise,positive,2,1,6,4,"00:08:53,241","00:09:01,206" 22 | 21,What are you talkin’ about? I never left you! You’ve always been my agent!,Joey,surprise,negative,2,2,6,4,"00:09:08,548","00:09:13,476" 23 | 22,Really?!,Estelle,surprise,positive,2,3,6,4,"0:09:13,594","0:09:14,476" 24 | 23,Yeah!,Joey,joy,positive,2,4,6,4,"0:09:14,476","0:09:15,728" 25 | 24,"Oh well, no harm, no foul.",Estelle,neutral,neutral,2,5,6,4,"00:09:16,138","00:09:19,224" 26 | 25,"Okay, you guys free tonight?",Gary,neutral,neutral,3,0,5,20,"0:01:00,894","0:01:02,271" 27 | 26,Yeah!!,Ross,joy,positive,3,1,5,20,"0:01:02,271","0:01:03,961" 28 | 27,Tonight? You-you didn't say it was going to be at nighttime.,Chandler,surprise,negative,3,2,5,20,"00:01:04,731","00:01:07,608" 29 | 28,Yes? Yes?! How can I help you?,Ross,neutral,neutral,4,0,7,7,"00:14:33,289","00:14:36,040" 30 | 29,"Yeah, we were…we were just looking around.",Guy,neutral,neutral,4,1,7,7,"00:14:36,208","00:14:38,001" 31 | 30,"Oh-oh, you’re-you’re fellow scholars.",Ross,surprise,negative,4,2,7,7,"00:14:38,210","00:14:40,587" 32 | 31,"What exactly were you looking for, hmm?",Ross,neutral,neutral,4,3,7,7,"00:14:40,754","00:14:43,256" 33 | 32,"Perhaps, perhaps Dr. Chester Stock’s musings on the Smiledon Californicus?",Ross,neutral,neutral,4,4,7,7,"00:14:43,424","00:14:50,597" 34 | 33,Uhh….,Guy,neutral,neutral,4,5,7,7,"00:14:51,932","00:14:53,099" 35 | 34,"Ah… Ah…Get out of here! Uh, meeting someone? Or-or are you just here to brush up on Marion’s views on evolution?",Ross,anger,negative,4,6,7,7,"00:14:51,932","00:15:11,743" 36 | 35,"Uh, actually I find Marion’s views far too progressionist.",Woman,neutral,neutral,4,7,7,7,"00:15:12,036","00:15:16,623" 37 | 36,I find Marion’s views far too progressionist.,Ross,neutral,neutral,4,8,7,7,"00:15:21,253","00:15:24,547" 38 | 37,"I’m sorry, who are you?",Woman,surprise,positive,4,9,7,7,"00:15:24,798","00:15:27,967" 39 | 38,"I’m a professor here uh, Ross…Geller.",Ross,neutral,neutral,4,10,7,7,"00:15:28,177","00:15:30,386" 40 | 39,"Ross Geller, why do I know that name? It’s uh—Wait! Did you write this?",Woman,surprise,positive,4,11,7,7,"00:15:30,638","00:15:41,022" 41 | 40,Yes! You’re the person who checked out my book?!,Ross,surprise,positive,4,12,7,7,"00:15:41,899","00:15:50,490" 42 | 41,"Y’know, you look nothing like I would’ve thought. You’re…you’re so young.",Woman,surprise,positive,4,13,7,7,"00:15:56,830","00:15:58,311" 43 | 42,"Well I uh, I skipped forth grade.",Ross,neutral,neutral,4,14,7,7,"00:15:59,500","00:16:03,544" 44 | 43,You had no right to tell me you ever had feelings for me.,Ross,anger,negative,5,0,2,7,"00:18:28,565","00:18:31,234" 45 | 44,What?,Rachel,surprise,negative,5,1,2,7,"00:18:31,693","00:18:33,528" 46 | 45,I was doing great with Julie before I found out about you.,Ross,anger,negative,5,2,2,7,"00:18:31,693","00:18:35,196" 47 | 46,"Hey, I was doin' great before I found out about you. You think it's easy for me to see you with Julie?",Rachel,anger,negative,5,3,2,7,"00:18:35,364","00:18:39,951" 48 | 47,The point is I...,Ross,anger,negative,5,4,2,7,"0:19:12,818","0:19:14,030" 49 | 48,"I don't need this right now, OK.",Ross,anger,negative,5,5,2,7,"0:19:14,030","0:19:15,699" 50 | 49,"It, it's too late, I'm with somebody else, I'm happy.",Ross,anger,negative,5,6,2,7,"00:19:15,821","00:19:20,741" 51 | 50,This ship has sailed.,Ross,anger,negative,5,7,2,7,"00:19:17,781","00:19:20,741" 52 | 51,"Alright, fine, you go ahead and you do that, alright Ross.",Rachel,anger,negative,5,8,2,7,"0:19:27,166","0:19:29,588" 53 | 52,Fine.,Ross,anger,negative,5,9,2,7,"0:19:29,588","0:19:29,727" 54 | 53,Cause I don't need your stupid ship.,Rachel,anger,negative,5,10,2,7,"00:19:29,835","00:19:31,210" 55 | 54,Good.,Ross,anger,negative,5,11,2,7,"0:19:31,378","0:19:32,440" 56 | 55,Good.,Rachel,anger,negative,5,12,2,7,"0:19:32,440","0:19:33,256" 57 | 56,"Oh, it's so romantic to send people off on their honeymoon.",Phoebe,joy,positive,6,0,8,3,"00:03:10,273","00:03:14,610" 58 | 57,"Y’know, Monica and Chandler are married. Ross and Rachel are having a baby. Maybe you and I should do something.",Joey,neutral,neutral,6,1,8,3,"00:03:14,861","00:03:25,120" 59 | 58,All in good time my love.,Phoebe,neutral,neutral,6,2,8,3,"0:03:19,032","0:03:22,044" 60 | 59,All in good time.,Phoebe,neutral,neutral,6,3,8,3,"0:03:22,044","0:03:25,177" 61 | 60,Oh shoot!,Phoebe,surprise,negative,6,4,8,3,"0:03:26,247","0:03:27,415" 62 | 61,I left my guitar in their apartment.,Phoebe,sadness,negative,6,5,8,3,"0:03:27,415","0:03:29,417" 63 | 62,Well you can let me in later.,Phoebe,neutral,neutral,6,6,8,3,"0:03:29,417","0:03:31,086" 64 | 63,"I don’t have a key, they took mine to give to you.",Joey,neutral,neutral,6,7,8,3,"0:03:31,211","0:03:33,589" 65 | 64,What?! They took mine to give to you!,Phoebe,surprise,negative,6,8,8,3,"0:03:33,589","0:03:33,746" 66 | 65,Why would they take away our keys?,Joey,surprise,negative,6,9,8,3,"00:03:33,880","00:03:38,884" 67 | 66,Wow! It looks like we got a lot of good stuff.,Ross,joy,positive,7,0,8,20,"00:15:01,722","00:15:03,557" 68 | 67,"Oh we did, but my mom got us the greatest gift of all.",Rachel,joy,positive,7,1,8,20,"00:15:03,724","00:15:06,560" 69 | 68,A,Ross,neutral,neutral,7,2,8,20,"00:15:06,769","00:15:08,729" 70 | 69,No. She’s going to live with us for eight weeks.,Rachel,neutral,neutral,7,3,8,20,"00:15:09,897","00:15:14,026" 71 | 70,"Uh, what?",Ross,surprise,positive,7,4,8,20,"00:15:14,276","00:15:15,672" 72 | 71,Yes! She’s gonna help us take care of the baby! Woo-hoo.,Rachel,joy,positive,7,5,8,20,"00:15:15,861","00:15:19,656" 73 | 72,What—You’re not serious.,Ross,surprise,negative,7,6,8,20,"00:15:20,574","00:15:22,743" 74 | 73,"I mean she’s a very nice woman, but there is no way we can take eight weeks of her.",Ross,anger,negative,7,7,8,20,"00:15:22,910","00:15:27,247" 75 | 74,She’ll drive us totally crazy.,Ross,disgust,negative,7,8,8,20,"0:15:27,414","0:15:28,999" 76 | 75,Hi Ross!,Mrs. Green,joy,positive,7,9,8,20,"0:15:28,999","0:15:29,508" 77 | 76,Hi roomie!,Ross,joy,positive,7,10,8,20,"00:15:29,625","00:15:31,835" 78 | 77,Hey! What did you decide to do about the movie?,Monica,neutral,neutral,8,0,7,19,"00:03:17,697","00:03:20,199" 79 | 78,I don’t know!,Joey,neutral,neutral,8,1,7,19,"00:03:20,366","00:03:22,743" 80 | 79,It’s not like it’s porn!,Joey,neutral,neutral,8,2,7,19,"0:03:23,119","0:03:24,621" 81 | 80,"This is a serious, legitimate movie.",Joey,neutral,neutral,8,3,7,19,"0:03:24,621","0:03:27,226" 82 | 82,And the nudity is really important to the story.,Joey,neutral,neutral,8,4,7,19,"00:03:27,332","00:03:29,750" 83 | 83,That’s what you say about porn.,Monica,neutral,neutral,8,5,7,19,"00:03:29,918","00:03:32,085" 84 | 84,You’re right. Maybe I shouldn’t even go on the call back.,Joey,neutral,neutral,8,6,7,19,"00:03:33,004","00:03:35,339" 85 | 85,"No! No you should! A lot of major actors do nude scenes! I mean, the chance to star in a movie? Come on!",Monica,joy,positive,8,7,7,19,"00:03:35,506","00:03:42,304" 86 | 86,Well that’s true.,Joey,neutral,neutral,8,8,7,19,"0:03:42,972","0:03:44,015" 87 | 87,And I am only naked in one scene.,Joey,neutral,neutral,8,9,7,19,"0:03:44,015","0:03:46,777" 88 | 88,Plus it sounds really great.,Joey,neutral,neutral,8,10,7,19,"0:03:46,777","0:03:48,325" 89 | 89,My character’s catholic and he falls in love with this Jewish girl.,Joey,neutral,neutral,8,11,7,19,"00:03:48,394","00:03:51,480" 90 | 90,Who run away together and they get caught in this big rainstorm.,Joey,neutral,neutral,8,12,7,19,"00:03:51,648","00:03:54,316" 91 | 91,So we go into this barn and undress each other and hold each other.,Joey,neutral,neutral,8,13,7,19,"00:03:54,484","00:03:58,028" 92 | 92,It’s really sweet and-and tender.,Joey,joy,positive,8,14,7,19,"00:03:58,196","00:04:01,240" 93 | 93,"Hey, what’s up?",Joey,neutral,neutral,9,0,6,3,"00:05:22,280","00:05:23,905" 94 | 94,"Nothing, Monica and I had a stupid fight.",Chandler,sadness,negative,9,1,6,3,"00:05:24,073","00:05:26,199" 95 | 95,"But you’re still moving in together, right? Because my ad came out today.",Joey,neutral,neutral,9,2,6,3,"00:05:26,367","00:05:29,786" 96 | 96,"""Wanted. Female roommate, non-smoker, non-ugly."" Nice!",Chandler,joy,positive,9,3,6,3,"00:05:30,872","00:05:34,291" 97 | 97,Yeah?,Joey,neutral,neutral,9,4,6,3,"00:05:37,211","00:05:38,712" 98 | 98,"I just figured y’know, after living with you it’d be an interesting change of pace to have a female roommate, y’know?",Joey,neutral,neutral,9,5,6,3,"00:05:38,880","00:05:43,508" 99 | 99,"Someone I can learn from, someone-someone who’s different than me.",Joey,neutral,neutral,9,6,6,3,"00:05:43,676","00:05:47,304" 100 | 100,And what’s more different than me. A guy who’s,Joey,neutral,neutral,9,7,6,3,"00:05:47,472","00:05:51,141" 101 | 101,So where are we going next?,Ross,neutral,neutral,10,0,5,20,"00:06:52,412","00:06:53,412" 102 | 102,This witness won't return my calls so we're gonna see if we can surprise him coming home.,Gary,neutral,neutral,10,1,5,20,"00:06:53,579","00:06:56,915" 103 | 103,"Sur-surprise him? We're not, we're not gonna make anybody mad are we?",Chandler,fear,negative,10,2,5,20,"00:06:57,125","00:07:00,752" 104 | 104,"Come on man! Listen so uh, are you gonna squeeze the perps shoes a little bit before he lawyers up?",Joey,joy,positive,10,3,5,20,"00:07:01,254","00:07:07,342" 105 | 105,It's a witness not a perp. And no one talks like that!,Gary,anger,negative,10,4,5,20,"0:07:07,593","0:07:10,096" 106 | 106,"Yeah, no one talks like that!",Ross,anger,negative,10,5,5,20,"0:07:10,096","0:07:10,240" 107 | 107,Oh what? Like your Mr. Cop!,Joey,anger,negative,10,6,5,20,"0:07:14,475","0:07:16,237" 108 | 108,"Hey, I'm more cop than you two!",Ross,anger,negative,10,7,5,20,"0:07:16,237","0:07:18,231" 109 | 109,How do you figure that?,Chandler,neutral,neutral,10,8,5,20,"00:07:18,438","00:07:20,063" 110 | 110,"Hello! I'm in the front seat, okay? I'm Gary's partner!",Ross,neutral,neutral,10,9,5,20,"00:07:20,273","00:07:25,610" 111 | 111,I guess so.,Phoebe,neutral,neutral,11,0,5,19,"00:05:29,287","00:05:30,412" 112 | 112,Here you go. Thank you!,Rachel,neutral,neutral,11,1,5,19,"0:05:34,459","0:05:36,879" 113 | 113,"Wait, Rach! Where's the other one?",Phoebe,neutral,neutral,11,2,5,19,"0:05:36,879","0:05:37,038" 114 | 114,"Oh what, you-you want both of them?",Rachel,surprise,positive,11,3,5,19,"00:05:37,503","00:05:40,172" 115 | 115,"Rachel Karen Green, where's the other earring?!",Phoebe,anger,negative,11,4,5,19,"00:05:40,590","00:05:43,050" 116 | 116,"Okay, okay, okay, look, just don't freak out, but I kinda lost it.",Rachel,fear,negative,11,5,5,19,"00:05:43,259","00:05:46,261" 117 | 117,"I know it's in the apartment, but I",Rachel,neutral,neutral,11,6,5,19,"00:05:46,429","00:05:49,973" 118 | 118,"Well, what am I going to tell Monica? She wants to wear them tonight!",Phoebe,fear,negative,11,7,5,19,"00:05:50,183","00:05:53,518" 119 | 119,Tell her to wear her own earrings.,Rachel,anger,negative,11,8,5,19,"0:05:53,728","0:05:57,065" 120 | 120,These,Phoebe,neutral,neutral,11,9,5,19,"0:05:57,065","0:05:57,211" 121 | 121,Nooo! Nooooo! You lent me Monica's earrings?! I'm not allowed to borrow her stuff!,Rachel,anger,negative,11,10,5,19,"00:05:57,315","00:06:03,570" 122 | 122,Why not?,Phoebe,neutral,neutral,11,11,5,19,"0:06:04,989","0:06:05,631" 123 | 123,Because I lose her stuff!,Rachel,anger,negative,11,12,5,19,"0:06:05,631","0:06:07,379" 124 | 127,"Uh Phoebe, can I see you for a second?",Ross,neutral,neutral,12,0,7,24,"0:11:56,507","0:11:58,179" 125 | 128,Yeah!,Phoebe,neutral,neutral,12,1,7,24,"0:11:58,179","0:12:00,071" 126 | 129,What’s going on?,Phoebe,neutral,neutral,12,2,7,24,"0:12:05,433","0:12:07,185" 127 | 130,Chandler’s gone again!,Ross,surprise,negative,12,3,7,24,"0:12:07,185","0:12:07,866" 128 | 131,Oh my God! Why would you play hide and seek with someone you know is a flight risk?!,Phoebe,sadness,negative,12,4,7,24,"00:12:08,060","00:12:13,481" 129 | 132,Okay. You ready to push again?,Dr. Harad,neutral,neutral,13,0,5,3,"00:16:02,544","00:16:04,504" 130 | 133,I already had a baby. Leave me alone.,Phoebe,anger,negative,13,1,5,3,"00:16:04,755","00:16:07,048" 131 | 134,"Okay, okay, come on, you can do it. You can do it!",Frank,joy,positive,13,2,5,3,"00:16:07,257","00:16:10,593" 132 | 135,Yeah!!,Frank,joy,positive,13,3,5,3,"00:16:18,352","00:16:19,769" 133 | 136,Little Leslie is here!,Frank,joy,positive,13,4,5,3,"0:16:20,479","0:16:22,451" 134 | 137,We got another one!,Frank,surprise,positive,13,5,5,3,"0:16:22,451","0:16:23,168" 135 | 138,"Oh my God, I can't believe I have two-two children.",Frank,surprise,positive,13,6,5,3,"00:16:23,983","00:16:27,485" 136 | 139,How scary is that?,Frank,surprise,positive,13,7,5,3,"00:16:28,529","00:16:30,405" 137 | 140,"Come on little Chandler, it's time to be born. Come on little Chandler! Come on!",Frank,joy,positive,13,8,5,3,"00:16:34,034","00:16:38,579" 138 | 141,"All right, he's coming. He's coming!",Dr. Harad,joy,positive,13,9,5,3,"00:16:39,456","00:16:41,541" 139 | 142,"Hey, where's his thing?",Frank,surprise,negative,13,10,5,3,"00:16:46,005","00:16:47,922" 140 | 143,Chandler's a girl!,Frank,surprise,positive,13,11,5,3,"00:16:52,136","00:16:53,678" 141 | 144,"Oh God, kindergarten flashback.",Chandler,surprise,negative,13,12,5,3,"00:16:55,681","00:16:58,141" 142 | 145,They musta read the sonogram wrong.,Frank,surprise,negative,13,13,5,3,"00:16:59,476","00:17:03,146" 143 | 146,"Cause they, 'cause they thought it was a boy, but Chandler's a girl!",Frank,surprise,positive,13,14,5,3,"00:16:59,476","00:17:05,440" 144 | 147,Chandler's a girl!,Frank,surprise,positive,13,15,5,3,"00:17:03,397","00:17:05,440" 145 | 148,"Okay, keep saying it!",Chandler,joy,positive,13,16,5,3,"00:17:05,649","00:17:07,316" 146 | 149,Am I too late?!,Alice,neutral,neutral,13,17,5,3,"00:17:08,777","00:17:11,779" 147 | 150,"No-no ah, everything's okay. Everybody's healthy there's 30 fingers and 30 toes.",Frank,joy,positive,13,18,5,3,"00:17:11,989","00:17:14,407" 148 | 151,We have our babies?,Alice,surprise,positive,13,19,5,3,"00:17:14,908","00:17:16,075" 149 | 152,Yeah.,Frank,joy,positive,13,20,5,3,"00:17:16,410","00:17:17,452" 150 | 153,"Oh, we have our babies.",Alice,joy,positive,13,21,5,3,"00:17:18,412","00:17:19,579" 151 | 154,Hey Toby!,Bob,joy,positive,14,0,8,5,"0:16:07,675","0:16:08,267" 152 | 155,Hey Bobby.,Chandler,neutral,neutral,14,1,8,5,"0:16:08,267","0:16:09,490" 153 | 156,"It’s Bob actually. Hey, you work up here, can you tell me where this Chandler",Bob,neutral,neutral,14,2,8,5,"00:16:09,885","00:16:17,225" 154 | 157,"Uhh yeah. Yeah, it’s right, right down there. Right there, yeah. Can I ask you why?",Chandler,neutral,neutral,14,3,8,5,"00:16:17,393","00:16:25,942" 155 | 158,"I want to talk to that bastard, see what his problem is.",Bob,anger,negative,14,4,8,5,"00:16:26,110","00:16:28,945" 156 | 159,"Okay Bob listen uhh, I’m the reason you didn’t get the job up here.",Chandler,sadness,negative,14,5,8,5,"00:16:29,113","00:16:35,410" 157 | 160,Toby don’t.,Bob,sadness,negative,14,6,8,5,"0:16:35,577","0:16:36,849" 158 | 161,Bob!,Chandler,sadness,negative,14,7,8,5,"0:16:36,849","0:16:37,541" 159 | 162,Toby! I’m not gonna let you cover for him. Anything you say right now will just get me more upset with Chandler!,Bob,anger,negative,14,8,8,5,"00:16:37,663","00:16:45,920" 160 | 164,Thank you. Oh Joey and look at this crib! It’s so cute!,Rachel,joy,positive,15,0,8,7,"00:20:49,414","00:20:58,464" 161 | 165,I know! I found it on the street.,Joey,joy,positive,15,1,8,7,"00:20:58,632","00:21:00,675" 162 | 166,Are you serious—Really?! It’s in such good condition.,Rachel,surprise,positive,15,2,8,7,"00:21:00,842","00:21:04,887" 163 | 167,Yeah.,Joey,neutral,neutral,15,3,8,7,"00:21:02,511","00:21:04,887" 164 | 168,Wow! Whoa-whoa what’s under the covers?,Rachel,surprise,negative,15,4,8,7,"00:21:05,055","00:21:07,473" 165 | 169,I don’t know.,Joey,neutral,neutral,15,5,8,7,"0:21:07,641","0:21:09,060" 166 | 170,It’s moving.,Rachel,fear,negative,15,6,8,7,"0:21:09,060","0:21:09,217" 167 | 171,Ew.,Joey,disgust,negative,15,7,8,7,"00:21:09,309","00:21:10,685" 168 | 172,It’s still——It’s got a tail! Get it out of here! Get it out of here!!,Rachel,fear,negative,15,8,8,7,"0:21:10,852","0:21:12,479" 169 | 173,Ooh! Ah! Okay!,Joey,fear,negative,15,9,8,7,"0:21:12,479","0:21:13,247" 170 | 174,"Well, I went over to Kyle’s last night to pick up a few things and we got to reminiscing",Whitney,neutral,neutral,16,0,7,5,"00:19:36,842","00:19:44,056" 171 | 175,we talked through most of the night and we realized that the reason we were so angry at each other was because there are still feelings there. So,Kyle,sadness,negative,16,1,7,5,"00:19:44,224","00:19:52,732" 172 | 176,Oh just say it Kyle!,Ross,surprise,negative,16,2,7,5,"00:19:58,030","00:19:59,697" 173 | 177,We’re gonna give it another try.,Kyle,joy,positive,16,3,7,5,"00:20:02,910","00:20:04,785" 174 | 178,What about her whining and her constant need for attention?!,Phoebe,anger,negative,16,4,7,5,"00:20:04,953","00:20:08,581" 175 | 179,I’m gonna work on that.,Whitney,neutral,neutral,16,5,7,5,"00:20:08,749","00:20:09,957" 176 | 180,"Oh right, because you’re so capable of change.",Phoebe,anger,negative,16,6,7,5,"00:20:10,125","00:20:12,418" 177 | 181,"Y’know, he hums when he pees!",Ross,anger,negative,16,7,7,5,"00:20:13,921","00:20:16,088" 178 | 182,I do know.,Whitney,neutral,neutral,16,8,7,5,"0:20:18,050","0:20:19,232" 179 | 183,"It makes him miss the bowl, but whatever.",Ross,disgust,negative,16,9,7,5,"0:20:19,232","0:20:22,446" 180 | 184,We’re so sorry.,Whitney,sadness,negative,16,10,7,5,"00:20:23,388","00:20:25,348" 181 | 185,"That’s all right, we-we don’t need you. In fact, hey I’m over it already.",Ross,anger,negative,16,11,7,5,"00:20:26,183","00:20:30,019" 182 | 186,"Yeah, and y’know what? I don’t give a tiny rat’s ass.",Phoebe,anger,negative,16,12,7,5,"00:20:30,187","00:20:33,397" 183 | 187,"Yeah, we’re gonna go.",Kyle,neutral,neutral,16,13,7,5,"00:20:34,900","00:20:36,734" 184 | 188,"I’m sorry. Ugh, Pheebs, you were, you were right about her. Y’know, she",Ross,sadness,negative,16,14,7,5,"00:20:40,906","00:20:47,203" 185 | 189,"Oh. Y’know, he hums while he does other stuff to.",Phoebe,neutral,neutral,16,15,7,5,"00:20:55,879","00:20:58,965" 186 | 190,"Yeah, we're better off without them.",Ross,anger,negative,16,16,7,5,"00:21:01,093","00:21:04,470" 187 | 191,"And y’know, even if they break up again, you’d better not let him in your sad men’s club!",Phoebe,anger,negative,16,17,7,5,"00:21:04,846","00:21:09,141" 188 | 192,Divorced men’s club.,Ross,sadness,negative,16,18,7,5,"00:21:09,309","00:21:12,603" 189 | 194,Why isn’t that valet back with my Porsche?,Joey,anger,negative,17,0,6,5,"00:14:50,514","00:14:54,183" 190 | 195,Maybe because you’ve got the keys?,Passerby,anger,negative,17,1,6,5,"00:14:55,603","00:14:57,520" 191 | 197,This is totally your fault!,Rachel,anger,negative,17,2,6,5,"0:15:03,110","0:15:04,582" 192 | 198,My fault?! You threatened the judge!,Ross,anger,negative,17,3,6,5,"0:15:04,582","0:15:07,079" 193 | 199,"Well, you ripped the paper out of the court reporter’s machine!!",Rachel,anger,negative,17,4,6,5,"00:15:07,197","00:15:10,116" 194 | 206,Phoebe!,Monica,neutral,neutral,18,0,6,22,"0:16:17,351","0:16:18,102" 195 | 207,Yeah?,Phoebe,neutral,neutral,18,1,6,22,"0:16:18,102","0:16:18,406" 196 | 208,Have you seen Chandler?!,Monica,neutral,neutral,18,2,6,22,"0:16:18,519","0:16:19,401" 197 | 209,No! Why?,Phoebe,neutral,neutral,18,3,6,22,"0:16:19,401","0:16:20,205" 198 | 210,The woman from the museum called and said that there was a cancellation and that we could move up our wedding and Chandler heard!,Monica,fear,negative,18,4,6,22,"00:16:20,312","00:16:25,566" 199 | 211,I know!,Monica,fear,negative,18,5,6,22,"0:16:26,944","0:16:27,320" 200 | 212,How bad is this?,Monica,fear,negative,18,6,6,22,"0:16:27,320","0:16:28,826" 201 | 214,"Well for the regular guy, it’s bad, but Chandler, Oh dear God!",Phoebe,fear,negative,18,7,6,22,"00:16:28,946","00:16:33,074" 202 | 215,I know! I know! And he totally freaked out and I can’t find him anywhere!,Monica,fear,negative,18,8,6,22,"00:16:34,660","00:16:37,662" 203 | 216,What are you gonna do?,Phoebe,neutral,neutral,18,9,6,22,"0:16:37,830","0:16:38,831" 204 | 217,"Well, I’m never gonna listen to you again, that’s for sure!",Monica,anger,negative,18,10,6,22,"0:16:38,831","0:16:41,285" 205 | 218,"""Y’know, harm can it do if you go and put your name down?""",Monica,neutral,neutral,18,11,6,22,"00:16:41,375","00:16:44,669" 206 | 219,Rachel said that!,Phoebe,surprise,negative,18,12,6,22,"0:16:45,546","0:16:46,728" 207 | 220,Well Rachel’s not here!,Monica,anger,negative,18,13,6,22,"0:16:46,728","0:16:47,766" 208 | 221,"Come on, come on.",Ross,neutral,neutral,19,0,1,23,"00:14:15,980","00:14:17,730" 209 | 222,"Damnit, damnit, damnit, damnit.",Ross,anger,negative,19,1,1,23,"0:14:20,234","0:14:23,156" 210 | 223,This is all your fault.,Ross,anger,negative,19,2,1,23,"0:14:23,156","0:14:24,118" 211 | 224,"This is supposed to be, like, the greatest day of my life, y'know?",Ross,anger,negative,19,3,1,23,"00:14:24,280","00:14:26,948" 212 | 225,"My son is being born, and I should be in there, you know, instead of stuck in a closet with you.",Ross,anger,negative,19,4,1,23,"00:14:27,116","00:14:32,161" 213 | 226,The woman I love is having a baby today. I've been waiting for this just as much as you have.,Susan,anger,negative,19,5,1,23,"00:14:32,329","00:14:35,665" 214 | 227,"No no no, believe me.",Ross,anger,negative,19,6,1,23,"0:14:35,833","0:14:37,095" 215 | 228,"No one has been waiting for this as much as I have, ok?",Ross,anger,negative,19,7,1,23,"0:14:37,095","0:14:39,055" 216 | 229,And you know what the funny thing is?,Ross,neutral,neutral,19,8,1,23,"00:14:39,169","00:14:40,879" 217 | 230,"When this day is over, you get to go home with the baby, ok?",Ross,anger,negative,19,9,1,23,"00:14:41,046","00:14:43,631" 218 | 231,Where does that leave me?,Ross,sadness,negative,19,10,1,23,"0:14:43,799","0:14:44,551" 219 | 232,You get to be the baby's father.,Susan,neutral,neutral,19,11,1,23,"0:14:44,551","0:14:46,275" 220 | 233,Everyone knows who you are.,Susan,neutral,neutral,19,12,1,23,"0:14:46,385","0:14:47,517" 221 | 234,Who am I?,Susan,anger,negative,19,13,1,23,"0:14:47,517","0:14:50,183" 222 | 235,"There's Mother's Day, there's Father's Day, there's no... Lesbian Lover Day.",Susan,sadness,negative,19,14,1,23,"00:14:50,306","00:14:52,599" 223 | 236,Every day is Lesbian Lover Day.,Ross,neutral,neutral,19,15,1,23,"00:14:52,766","00:14:55,226" 224 | 237,This is so great.,Phoebe,joy,positive,19,16,1,23,"00:14:58,063","00:14:59,814" 225 | 238,You wanna explain that?,Ross,neutral,neutral,19,17,1,23,"00:15:03,986","00:15:05,570" 226 | 239,"I mean, well, 'cause when I was growing up, you know my dad left, and my mother died, and my stepfather went to jail, so I barely had enough pieces of parents to make one whole one.",Phoebe,sadness,negative,19,18,1,23,"00:15:06,280","00:15:16,664" 227 | 240,And here's this little baby who has like three whole parents who care about it so much that they're fighting over who gets to love it the most.,Phoebe,joy,positive,19,19,1,23,"00:15:17,791","00:15:27,842" 228 | 241,And it's not even born yet.,Phoebe,sadness,negative,19,20,1,23,"00:15:25,424","00:15:27,842" 229 | 242,"It's just, it's just the luckiest baby in the whole world.",Phoebe,joy,positive,19,21,1,23,"00:15:28,010","00:15:30,553" 230 | 243,"I'm sorry, you were fighting.",Phoebe,sadness,negative,19,22,1,23,"00:15:33,349","00:15:35,433" 231 | 244,"Okay, it's a typical New York City apartment. Two girls are just hanging out.",Joey,neutral,neutral,20,0,5,10,"00:21:31,498","00:21:37,128" 232 | 245,"Hi, how are you doing Kelly?",Monica,neutral,neutral,20,1,5,10,"00:21:37,879","00:21:41,465" 233 | 246,"I'm doing just fine! God, Tiffany, you smell so great!",Rachel,joy,positive,20,2,5,10,"00:21:41,633","00:21:44,385" 234 | 247,It's my new perfume. Why don't you come closer where you can,Monica,neutral,neutral,20,3,5,10,"00:21:46,555","00:21:52,643" 235 | 248,"Oh, y'know Joey, you are sick!",Rachel,disgust,negative,20,4,5,10,"0:21:55,230","0:21:57,662" 236 | 249,This is disgusting!,Monica,disgust,negative,20,5,5,10,"0:21:57,662","0:21:58,196" 237 | 250,I'm not reading this!,Rachel,disgust,negative,20,6,5,10,"00:21:58,317","00:22:00,109" 238 | 251,What?! Wait-wait-wait! The handsome man was about to enter!!,Joey,surprise,negative,20,7,5,10,"00:22:00,277","00:22:04,488" 239 | 252,"All right, I'll give you this, Mr. Peanut is a better dresser.",Joey,neutral,neutral,21,0,1,20,"00:21:27,119","00:21:30,621" 240 | 253,"I mean he's got the monocle, he's got the top hat...",Joey,neutral,neutral,21,1,1,20,"00:21:30,789","00:21:33,833" 241 | 254,You know he's gay?,Phoebe,neutral,neutral,21,2,1,20,"00:21:34,001","00:21:35,876" 242 | 255,I just wanna clarify this: are you outing Mr. Peanut?,Ross,neutral,neutral,21,3,1,20,"00:21:38,964","00:21:43,092" 243 | 256,"Danielle! Hi! Uh- everybody, this is Danielle, Danielle, everybody.",Chandler,neutral,neutral,21,4,1,20,"00:21:44,303","00:21:49,765" 244 | 257,Hi. Hi.,All,neutral,neutral,21,5,1,20,"00:21:49,933","00:21:51,142" 245 | 258,What are you doing here?,Chandler,surprise,positive,21,6,1,20,"00:21:51,310","00:21:53,728" 246 | 259,"Well, what?",Chandler,neutral,neutral,22,0,1,4,"0:17:41,977","0:17:42,689" 247 | 260,What?,Chandler,neutral,neutral,22,1,1,4,"0:17:42,689","0:17:43,041" 248 | 261,What is it?,Chandler,neutral,neutral,22,2,1,4,"0:17:43,041","0:17:43,563" 249 | 262,That she left you?,Chandler,surprise,negative,22,3,1,4,"0:17:43,563","0:17:44,365" 250 | 263,That she likes women?,Chandler,neutral,neutral,22,4,1,4,"0:17:44,365","0:17:44,908" 251 | 264,That she left you for another woman that likes women?,Chandler,neutral,neutral,22,5,1,4,"00:17:44,938","00:17:47,106" 252 | 265,"Little louder, okay, I think there's a man on the twelfth floor in a coma that didn't quite hear you...",Ross,anger,negative,22,6,1,4,"00:17:47,274","00:17:51,652" 253 | 266,Then what?,Chandler,neutral,neutral,22,7,1,4,"00:17:55,282","00:17:56,365" 254 | 267,My first time with Carol was...,Ross,neutral,neutral,22,8,1,4,"00:17:57,493","00:18:00,161" 255 | 268,What?,Joey,neutral,neutral,22,9,1,4,"00:18:03,624","00:18:05,041" 256 | 269,It was my,Ross,neutral,neutral,22,10,1,4,"00:18:07,586","00:18:10,379" 257 | 270,With Carol? Oh.,Joey,surprise,negative,22,11,1,4,"00:18:13,008","00:18:14,842" 258 | 271,"So in your whole life, you've only been with one——oh.",Chandler,surprise,negative,22,12,1,4,"00:18:21,683","00:18:24,519" 259 | 272,"Whoah, boy, hockey was a big mistake! There was a whole bunch of stuff we could've done tonight!",Joey,surprise,negative,22,13,1,4,"00:18:26,814","00:18:34,445" 260 | 273,Hi. Where is everybody?,Ross,neutral,neutral,23,0,3,6,"00:17:21,123","00:17:22,790" 261 | 274,"Oh, it’s already closed, Chris gave me the keys to lock up-what is wrong?",Phoebe,sadness,negative,23,1,3,6,"00:17:22,958","00:17:27,128" 262 | 275,"My marriage, I think my marriage is um, is kinda over.",Ross,sadness,negative,23,2,3,6,"00:17:27,337","00:17:34,135" 263 | 276,Oh no! Why?,Phoebe,surprise,negative,23,3,3,6,"00:17:32,301","00:17:34,135" 264 | 277,"‘Cause Carol’s a lesbian. And, and I’m not one. And apparently it’s not a mix and match situation.",Ross,sadness,negative,23,4,3,6,"00:17:34,303","00:17:49,484" 265 | 278,"Oh my God! I don’t believe it! Oh, you poor bunny.",Phoebe,surprise,negative,23,5,3,6,"00:17:50,152","00:17:57,658" 266 | 279,I’m an idiot.,Ross,disgust,negative,23,6,3,6,"00:17:59,369","00:18:00,661" 267 | 280,"I mean shoulda seen it, I mean Carol and I’d be out and she’d, she’d see some beautiful woman, and, and she’d be Ross y'know look at her, and I’d think, God, my wife is cool!",Ross,sadness,negative,23,7,3,6,"00:18:03,499","00:18:13,674" 268 | 281,"Aw! Hey, do you think that Susan person is her lover?",Phoebe,neutral,neutral,23,8,3,6,"00:18:21,850","00:18:26,854" 269 | 282,"Well, now I do!!",Ross,surprise,negative,23,9,3,6,"00:18:29,858","00:18:31,651" 270 | 283,I’m sorry.,Phoebe,sadness,negative,23,10,3,6,"00:18:33,529","00:18:34,570" 271 | 284,Seven years.,Ross,sadness,negative,23,11,3,6,"00:18:37,199","00:18:38,866" 272 | 285,"I mean we’ve been together seven years, she’s the only woman who’s ever loved me, and the only woman I’ve-I’ve ever....",Ross,sadness,negative,23,12,3,6,"00:18:39,576","00:18:48,876" 273 | 286,"Aw, God Ross. Oh.",Phoebe,sadness,negative,23,13,3,6,"00:18:50,712","00:18:52,046" 274 | 287,I’ll do it.,Cookie,neutral,neutral,24,0,3,11,"0:19:49,938","0:19:51,690" 275 | 288,No you won’t.,Joey,neutral,neutral,24,1,3,11,"0:19:51,690","0:19:51,869" 276 | 289,"Look he knows he did a terrible thing and I believe him, he’s sorry.",Joey,sadness,negative,24,2,3,11,"00:19:52,357","00:19:57,904" 277 | 290,"But, you’ve got one more apology to make, all right, you’ve got to apologize to Mary-Angela.",Joey,neutral,neutral,24,3,3,11,"00:19:55,194","00:20:00,740" 278 | 291,"Okay, absolutely!",Chandler,joy,positive,24,4,3,11,"0:20:00,908","0:20:02,180" 279 | 292,All right.,Joey,neutral,neutral,24,5,3,11,"0:20:02,180","0:20:02,931" 280 | 293,You’ve got it.,Chandler,neutral,neutral,24,6,3,11,"0:20:02,931","0:20:03,875" 281 | 294,"Cookie, now you can punch him!",Joey,anger,negative,24,7,3,11,"0:20:13,545","0:20:15,089" 282 | 295,What?!,Chandler,surprise,negative,24,8,3,11,"0:20:15,089","0:20:15,511" 283 | 296,"All right, that's it, I quit.",Phoebe,anger,negative,25,0,2,1,"0:13:25,095","0:13:26,555" 284 | 297,What? I didn't say anything.,Monica,surprise,negative,25,1,2,1,"0:13:26,555","0:13:28,453" 285 | 298,"Yeah, but this isn't the face of a person who trusts a person.",Phoebe,anger,negative,25,2,2,1,"00:13:28,557","00:13:32,310" 286 | 299,"Ok, this is the face of a person who, you know, doesn't trust a person.",Phoebe,anger,negative,25,3,2,1,"00:13:32,478","00:13:37,690" 287 | 300,"I'm sorry. I'm sorry, Phoebe. It's just a little shorter than what we had discussed.",Monica,sadness,negative,25,4,2,1,"00:13:38,818","00:13:44,405" 288 | 301,Would you relax? I know what I am doing. This is how he wears it.,Phoebe,anger,negative,25,5,2,1,"00:13:44,573","00:13:50,870" 289 | 302,Julie.,Monica,neutral,neutral,26,0,2,2,"0:10:42,642","0:10:43,185" 290 | 303,What?!,Rachel,surprise,negative,26,1,2,2,"0:10:43,185","0:10:43,747" 291 | 304,Jody!,Monica,surprise,negative,26,2,2,2,"0:10:43,747","0:10:45,255" 292 | 305,You were with Julie?,Rachel,neutral,neutral,26,3,2,2,"00:10:46,812","00:10:50,523" 293 | 306,"Look, when it started I was just trying to be nice to her because she was my brother's girlfriend.",Monica,neutral,neutral,26,4,2,2,"00:10:50,691","00:10:56,363" 294 | 307,"And then, one thing led to another and, before I knew it, we were...shopping.",Monica,neutral,neutral,26,5,2,2,"00:10:56,530","00:11:02,786" 295 | 308,Oh. Oh my God.,Rachel,surprise,negative,26,6,2,2,"00:11:09,669","00:11:11,336" 296 | 309,"Honey, wait. We only did it once. It didn't mean anything to me.",Monica,sadness,negative,26,7,2,2,"00:11:12,755","00:11:18,510" 297 | 310,"Yeah, right. Sure!",Rachel,anger,negative,26,8,2,2,"00:11:20,012","00:11:21,805" 298 | 311,"Really, Rachel, I was thinking of you the whole time.",Monica,sadness,negative,26,9,2,2,"00:11:21,972","00:11:24,849" 299 | 312,"Look, I'm sorry, all right.",Monica,sadness,negative,26,10,2,2,"0:11:27,853","0:11:30,865" 300 | 313,I never meant for you to find out!,Monica,sadness,negative,26,11,2,2,"0:11:30,865","0:11:32,163" 301 | 314,"Oh, please, you wanted to get caught.",Rachel,anger,negative,26,12,2,2,"00:11:32,274","00:11:35,985" 302 | 315,That is not true!,Monica,anger,negative,26,13,2,2,"00:11:36,445","00:11:37,696" 303 | 316,"Oh, so you just sort of happened to leave it in here?",Rachel,anger,negative,26,14,2,2,"00:11:37,905","00:11:40,323" 304 | 317,Did it ever occur to you that I might just be that stupid?,Monica,anger,negative,26,15,2,2,"00:11:41,409","00:11:45,120" 305 | 318,"Ok, Monica. I just have to know one thing. Did you go with her to",Rachel,sadness,negative,26,16,2,2,"00:11:47,039","00:11:55,171" 306 | 320,Yeah!,Monica,surprise,negative,27,0,8,1,"00:01:28,088","00:01:29,505" 307 | 321,I can’t say.,Phoebe,neutral,neutral,27,1,8,1,"00:01:30,173","00:01:31,548" 308 | 322,Why?!,Monica,surprise,negative,27,2,8,1,"0:01:32,133","0:01:32,968" 309 | 323,Why not?,Chandler,sadness,negative,27,3,8,1,"0:01:32,968","0:01:33,738" 310 | 324,I can’t say because he’s famous.,Phoebe,neutral,neutral,27,4,8,1,"00:01:34,344","00:01:37,596" 311 | 325,"Oh my God, who is it?!",Rachel,surprise,negative,27,5,8,1,"00:01:38,515","00:01:40,182" 312 | 326,"Phoebe, come on, you have to tell us.",Monica,anger,negative,27,6,8,1,"00:01:41,976","00:01:44,103" 313 | 327,"Okay, okay. It’s James Brolin. James Brolin is the father of my baby.",Phoebe,neutral,neutral,27,7,8,1,"00:01:44,270","00:01:51,819" 314 | 328,As in Barbara Streisand’s husband James Brolin?,Chandler,surprise,negative,27,8,8,1,"00:01:52,195","00:01:55,072" 315 | 329,What?! Well he never said that to me!,Phoebe,surprise,negative,27,9,8,1,"00:01:55,782","00:01:59,701" 316 | 330,In,Ross,neutral,neutral,28,0,5,8,"00:04:00,865","00:04:02,991" 317 | 331,"Oh, this life! Oh okay no, Chandler's is worse.",Phoebe,sadness,negative,28,1,5,8,"00:04:04,118","00:04:06,995" 318 | 332,"Man, it must be so cool remembering stuff like that! I don't have any past life memories.",Joey,joy,positive,28,2,5,8,"00:04:08,831","00:04:14,044" 319 | 333,Of course you don't sweetie. You're brand new.,Phoebe,neutral,neutral,28,3,5,8,"00:04:14,963","00:04:17,798" 320 | 334,I know Monica's worst Thanksgiving.,Rachel,neutral,neutral,28,4,5,8,"00:04:19,968","00:04:22,010" 321 | 335,"Oh, let's not tell this story.",Monica,sadness,negative,28,5,5,8,"0:04:22,178","0:04:23,780" 322 | 336,"Oh, come on!",All,sadness,negative,28,6,5,8,"0:04:23,780","0:04:24,782" 323 | 337,"Oh no, I know! I know! It's the one where Joey got Monica's turkey stuck on his head!",Phoebe,joy,positive,28,7,5,8,"00:04:24,889","00:04:30,394" 324 | 338,What?! Joey got a turkey stuck on his head?!,Rachel,surprise,positive,28,8,5,8,"00:04:31,229","00:04:35,524" 325 | 339,"Hey, it's not like it sounds.",Joey,neutral,neutral,28,9,5,8,"0:04:35,692","0:04:36,485" 326 | 340,It's,Chandler,neutral,neutral,28,10,5,8,"0:04:36,485","0:04:37,176" 327 | 341,"Wendy, we had a deal! Yeah, you promised! Wendy! Wendy! Wendy!",Monica,anger,negative,29,0,1,15,"00:15:52,368","00:15:56,496" 328 | 342,Who was that?,Rachel,neutral,neutral,29,1,1,15,"00:16:03,587","00:16:05,213" 329 | 343,Wendy bailed. I have no waitress.,Monica,sadness,negative,29,2,1,15,"00:16:07,049","00:16:10,218" 330 | 344,Oh... that's too bad. Bye bye.,Rachel,sadness,negative,29,3,1,15,"00:16:11,971","00:16:15,974" 331 | 345,Ten dollars an hour.,Monica,neutral,neutral,29,4,1,15,"0:16:16,976","0:16:18,068" 332 | 346,No.,Rachel,neutral,neutral,29,5,1,15,"0:16:18,068","0:16:18,620" 333 | 347,Twelve dollars an hour.,Monica,neutral,neutral,29,6,1,15,"00:16:18,936","00:16:20,061" 334 | 348,"Mon. I wish I could, but I've made plans to walk around.",Rachel,neutral,neutral,29,7,1,15,"00:16:20,521","00:16:23,856" 335 | 349,"You know, Rachel, when you ran out of your wedding, I was there for you.",Monica,anger,negative,29,8,1,15,"00:16:25,792","00:16:28,319" 336 | 350,"I put a roof over your head, and if that means nothing to you... twenty dollars an hour.",Monica,anger,negative,29,9,1,15,"00:16:28,487","00:16:35,034" 337 | 351,Done.,Rachel,joy,positive,29,10,1,15,"00:16:36,370","00:16:37,662" 338 | 352,"The reactor’s gonna blow in three seconds, we’re never gonna make it!",Joey,fear,negative,30,0,6,20,"00:00:05,005","00:00:08,549" 339 | 353,You’ve got to get out of here! Save yourself!,Phoebe,fear,negative,30,1,6,20,"00:00:08,717","00:00:11,802" 340 | 354,No! I won’t leave you!,Joey,fear,negative,30,2,6,20,"00:00:13,555","00:00:15,014" 341 | 355,"Don’t worry about me, I’m a robot! I’m just a machine!!",Phoebe,sadness,negative,30,3,6,20,"00:00:15,181","00:00:20,060" 342 | 356,No you’re not! Not to me!,Joey,anger,negative,30,4,6,20,"0:00:21,521","0:00:23,523" 343 | 357,Oh my God.,Phoebe,surprise,positive,30,5,6,20,"0:00:23,523","0:00:25,329" 344 | 358,What?,Joey,neutral,neutral,30,6,6,20,"0:00:25,442","0:00:26,124" 345 | 359,I am,Phoebe,neutral,neutral,30,7,6,20,"0:00:26,124","0:00:28,664" 346 | 360,"Yeah, you’re great! Okay, let’s take it from",Joey,joy,positive,30,8,6,20,"00:00:29,446","00:00:35,159" 347 | 361,"No, I mean I was really acting my ass off.",Phoebe,joy,positive,30,9,6,20,"00:00:31,031","00:00:35,159" 348 | 362,"Yeah, I thought I was pretty good too.",Joey,joy,positive,30,10,6,20,"00:00:36,327","00:00:38,078" 349 | 363,"Oh yeah, you’re solid. Yeah, you’re just no me.",Phoebe,neutral,neutral,30,11,6,20,"00:00:38,246","00:00:40,789" 350 | 364,Y’know what? I think that’s enough for now. Yeah. I don’t want to be over rehearsed.,Joey,neutral,neutral,30,12,6,20,"00:00:42,500","00:00:46,962" 351 | 365,Fine!,Phoebe,anger,negative,30,13,6,20,"0:00:47,547","0:00:48,219" 352 | 366,I’ll do it without you!,Phoebe,anger,negative,30,14,6,20,"0:00:48,219","0:00:50,279" 353 | 367,I don’t need you or anybody else!,Phoebe,anger,negative,30,15,6,20,"00:00:50,800","00:00:53,552" 354 | 368,I’m gonna make it on my own!,Phoebe,anger,negative,30,16,6,20,"00:00:53,803","00:00:56,346" 355 | 369,You’ll see!!,Phoebe,anger,negative,30,17,6,20,"0:00:57,682","0:01:00,435" 356 | 370,You’ll,Phoebe,neutral,neutral,30,18,6,20,"0:01:00,435","0:01:00,574" 357 | 371,I can't believe that Ross is gone. It is just so sad.,Kori,sadness,negative,31,0,9,17,"00:22:08,315","00:22:11,902" 358 | 372,I didn't know Ross and you were so close.,Chandler,surprise,negative,31,1,9,17,"00:22:12,110","00:22:14,154" 359 | 373,We weren't but we had one class together. He was such a great guy and he talked so passionately about science. I always remembered him.,Kori,sadness,negative,31,2,9,17,"00:22:14,362","00:22:25,749" 360 | 374,I'm sure that would mean a lot to him.,Chandler,neutral,neutral,31,3,9,17,"00:22:22,120","00:22:25,749" 361 | 375,"And if heaven has a door, I'm sure he's pressing his ear up against it and listening intently.",Chandler,neutral,neutral,31,4,9,17,"00:22:25,916","00:22:31,671" 362 | 376,I thought so many times about calling him and asking him out. I guess I really missed my chance.,Kori,sadness,negative,31,5,9,17,"00:22:33,507","00:22:39,554" 363 | 377,But you didn't!,Ross,joy,positive,31,6,9,17,"00:22:39,971","00:22:42,265" 364 | 378,I'm still alive!!,Ross,joy,positive,31,7,9,17,"00:22:44,059","00:22:45,852" 365 | 379,"Kori, I know this is a big surprise for you.",Ross,joy,positive,31,8,9,17,"00:22:47,103","00:22:49,606" 366 | 380,It's a long story but the things you just said really made my day!,Ross,joy,positive,31,9,9,17,"00:22:49,815","00:22:53,944" 367 | 381,"I mean, the fact that you are here means more to me than if this room were filled with people!",Ross,joy,positive,31,10,9,17,"00:22:54,110","00:22:59,517" 368 | 382,"You sick freak, who does that? I can't believe I had a crush on you!",Kori,anger,negative,31,11,9,17,"00:22:59,825","00:23:04,120" 369 | 383,Did you hear that? Kori Weston had a crush on me!!,Ross,joy,positive,31,12,9,17,"00:23:09,584","00:23:15,257" 370 | 384,We’ll do a quick check.,Dr. Long,neutral,neutral,32,0,8,22,"0:11:13,702","0:11:15,214" 371 | 385,Okay.,Rachel,neutral,neutral,32,1,8,22,"0:11:15,214","0:11:16,092" 372 | 386,"So, eight days late huh?",Dr. Long,surprise,positive,32,2,8,22,"0:11:16,247","0:11:18,208" 373 | 387,Yeah.,Rachel,neutral,neutral,32,3,8,22,"0:11:18,208","0:11:18,433" 374 | 388,You must be a little uncomfortable.,Dr. Long,neutral,neutral,32,4,8,22,"00:11:18,541","00:11:20,042" 375 | 389,"Eh, just a tad.",Rachel,neutral,neutral,32,5,8,22,"00:11:20,209","00:11:22,837" 376 | 390,"You’re about 80 percent effaced, so you’re on your way.",Dr. Long,neutral,neutral,32,6,8,22,"0:11:23,712","0:11:26,524" 377 | 391,It still could last a little while longer.,Dr. Long,neutral,neutral,32,7,8,22,"0:11:26,524","0:11:28,769" 378 | 392,If you’re anxious there are a few ways to help things along.,Dr. Long,neutral,neutral,32,8,8,22,"00:11:23,712","00:11:34,056" 379 | 393,Do them!!,Ross,anger,negative,32,9,8,22,"00:11:28,968","00:11:34,056" 380 | 394,"Actually, they’re things you can do. Just some home remedies, but in my experience I’ve found that some of them are quite effective.",Dr. Long,neutral,neutral,32,10,8,22,"00:11:35,015","00:11:42,857" 381 | 395,"Well, we are ready to try anything.",Rachel,neutral,neutral,32,11,8,22,"0:11:43,023","0:11:45,155" 382 | 396,"Okay, there’s an herbal tea you can drink.",Dr. Long,neutral,neutral,32,12,8,22,"0:11:45,155","0:11:48,123" 383 | 397,Okay.,Rachel,neutral,neutral,32,13,8,22,"00:11:48,237","00:11:49,280" 384 | 398,What is wrong with Emma?,Chandler,sadness,negative,33,0,9,2,"00:13:18,339","00:13:20,507" 385 | 399,"Oh she misunderstood, she thought she was moving to Tulsa.",Monica,neutral,neutral,33,1,9,2,"00:13:18,339","00:13:22,634" 386 | 400,Anytime you're ready.,Carol,neutral,neutral,34,0,1,9,"00:14:17,565","00:14:18,940" 387 | 401,"Ok, ok, here we go.",Ross,neutral,neutral,34,1,1,9,"00:14:19,942","00:14:23,987" 388 | 402,"Ok, where am I talking to, here?",Ross,neutral,neutral,34,2,1,9,"00:14:28,409","00:14:32,453" 389 | 403,"I mean, uh, well, there is one way that seems to offer a certain acoustical advantage, but...",Ross,neutral,neutral,34,3,1,9,"00:14:32,621","00:14:37,417" 390 | 404,Just aim for the bump.,Carol,neutral,neutral,34,4,1,9,"00:14:38,335","00:14:39,961" 391 | 405,"Ok, ok, ok, ok, here goes.",Ross,neutral,neutral,34,5,1,9,"00:14:41,130","00:14:47,093" 392 | 406,"You know, I, you know, can't do this.",Ross,fear,negative,34,6,1,9,"00:14:54,101","00:14:56,853" 393 | 407,"Uh, this is too weird.",Ross,disgust,negative,34,7,1,9,"0:14:57,021","0:14:59,023" 394 | 408,I feel stupid.,Ross,sadness,negative,34,8,1,9,"0:14:59,023","0:15:00,168" 395 | 409,"So don't do it, it's fine. You don't have to do it just because Susan does it.",Carol,neutral,neutral,34,9,1,9,"00:15:01,108","00:15:05,904" 396 | 410,"Hello, baby. Hello, hello.",Ross,joy,positive,34,10,1,9,"00:15:06,071","00:15:10,742" 397 | 412,"Oh, hi. It’s Mark.",Mark,neutral,neutral,35,0,3,12,"00:04:18,258","00:04:20,384" 398 | 418,Easy. Easy. You have to go to the hospital. Okay?,Ross,fear,negative,36,0,3,21,"00:15:26,342","00:15:30,345" 399 | 419,"Okay, I do.",Rachel,neutral,neutral,36,1,3,21,"0:15:30,512","0:15:31,324" 400 | 420,Okay.,Ross,neutral,neutral,36,2,3,21,"0:15:31,324","0:15:31,706" 401 | 421,I really do.,Rachel,neutral,neutral,36,3,3,21,"0:15:31,706","0:15:32,541" 402 | 422,"Okay, I’m gonna get your coat and then I’ll-I’ll put you in a cab.",Ross,neutral,neutral,36,4,3,21,"00:15:32,681","00:15:35,141" 403 | 423,"Okay. Oh wait, wait-wait, you’re not gonna come with me?",Rachel,sadness,negative,36,5,3,21,"00:15:35,309","00:15:37,135" 404 | 424,Of course I am. I just have to make a call.,Ross,surprise,positive,36,6,3,21,"00:15:40,856","00:15:45,109" 405 | 425,Okay.,Rachel,neutral,neutral,36,7,3,21,"0:15:45,319","0:15:46,154" 406 | 426,Okay?,Ross,neutral,neutral,36,8,3,21,"0:15:46,154","0:15:46,454" 407 | 427,Thank you. Oww!!!! God!,Rachel,surprise,negative,36,9,3,21,"00:15:46,570","00:15:53,368" 408 | 428,"What?! I wh-, what’s wrong?",Ross,fear,negative,36,10,3,21,"00:15:53,535","00:15:54,661" 409 | 429,"I’m sorry, I just can’t go to the hospital lookin’ like this.",Rachel,disgust,negative,36,11,3,21,"00:15:54,828","00:15:58,498" 410 | 430,"Pete Becker is circling the ring now. It looks like, he’s just trying to feel him out. Oh, Bruiser is just...",TV Announcer,neutral,neutral,37,0,3,24,"00:21:57,065","00:22:03,237" 411 | 431,"Run! Run you crazy, rich freak!",Chandler,fear,negative,37,1,3,24,"00:22:03,488","00:22:06,157" 412 | 432,"Oh, I can’t watch this.",Rachel,fear,negative,37,2,3,24,"00:22:07,826","00:22:09,076" 413 | 433,"Check it out, he’s winning! Pete’s winning!",Joey,surprise,positive,37,3,3,24,"00:22:09,369","00:22:10,995" 414 | 434,Really?!,Monica,surprise,positive,37,4,3,24,"0:22:11,246","0:22:12,838" 415 | 435,No-o-o!!,Joey,fear,negative,37,5,3,24,"0:22:12,838","0:22:13,295" 416 | 436,"Uh-oh, Bruiser has Becker on the canvas and is going for his favourite area.",TV Announcer,fear,negative,37,6,3,24,"00:22:15,751","00:22:20,171" 417 | 437,Oh! Oh!,All,disgust,negative,37,7,3,24,"00:22:20,422","00:22:21,672" 418 | 438,"Wait, if that’s his favourite area, why is he being so mean to it?",Phoebe,surprise,negative,37,8,3,24,"00:22:21,961","00:22:25,926" 419 | 439,"Well, this is ironic.",Ross,surprise,negative,37,9,3,24,"00:22:26,595","00:22:27,845" 420 | 440,"Of your last two boyfriends, Richard didn’t want to have kids, and from the looks of it, now Pete can’t.",Ross,neutral,neutral,37,10,3,24,"00:22:28,096","00:22:33,601" 421 | 441,"Dude, you don’t have to brag! We got nothing here!!",Joey,anger,negative,38,0,4,2,"00:21:29,705","00:21:33,165" 422 | 442,Should we tell Rachel there’s an empty private room right next door to hers?,Chandler,neutral,neutral,39,0,8,24,"00:01:07,013","00:01:10,808" 423 | 443,"We could, or we can have sex in it.",Monica,joy,positive,39,1,8,24,"00:01:11,851","00:01:15,104" 424 | 444,"Well let me think about that, while I remove my pants!",Chandler,joy,positive,39,2,8,24,"00:01:16,439","00:01:19,484" 425 | 445,I thought I was a complete idiot.,Rachel,surprise,positive,40,0,8,5,"00:06:37,605","00:06:40,857" 426 | 446,"Hey, I’m with you. He even asked me if I thought you’d go out with him.",Joey,neutral,neutral,40,1,8,5,"00:06:37,605","00:06:45,570" 427 | 447,"Oh! Oh, I think I’m gonna throw up a little bit. What did you say?",Rachel,disgust,negative,40,2,8,5,"00:06:45,822","00:06:50,575" 428 | 448,I said no.,Joey,neutral,neutral,40,3,8,5,"0:06:48,366","0:06:50,008" 429 | 449,What?!,Rachel,surprise,positive,40,4,8,5,"0:06:50,008","0:06:50,628" 430 | 450,What? I…I just figured since you’re pregnant you’re not gonna be seeing people.,Joey,surprise,negative,40,5,8,5,"00:06:50,743","00:06:56,706" 431 | 451,"Okay Joey, first of all Kash Ford is not people. Second of all, what did he say when you told him I was pregnant?",Rachel,anger,negative,40,6,8,5,"00:06:56,874","00:06:58,750" 432 | 452,I didn’t tell him. I didn’t know if you were telling people. This is back when I thought Kash was still people.,Joey,neutral,neutral,40,7,8,5,"00:07:06,551","00:07:12,431" 433 | 453,"Good-good, don’t tell him. Don’t tell him. Just have him call me okay?",Rachel,fear,negative,40,8,8,5,"0:07:12,598","0:07:14,851" 434 | 454,"Rach look, I really don’t think that’s such a great",Joey,sadness,negative,40,9,8,5,"0:07:14,851","0:07:16,450" 435 | 455,"Okay, you go do it! I’ll come back to that set! I’ll meet more actors! I’ll meet ‘em all!",Rachel,joy,positive,40,10,8,5,"00:07:16,561","00:07:21,273" 436 | 456,"Ohh, here you are. I was looking for you before. Joshua’s gone so you and Emily are free to go.",Rachel,neutral,neutral,41,0,4,16,"00:18:06,543","00:18:12,548" 437 | 457,That’s okay.,Ross,neutral,neutral,41,1,4,16,"00:18:12,966","00:18:14,467" 438 | 458,"She’s still in there enjoying her fake party and uh, it’s too late to do any of the things I had planned, so",Ross,neutral,neutral,41,2,4,16,"00:18:14,927","00:18:21,808" 439 | 459,Ah! Ah! I forgot my jacket!,Ross,anger,negative,42,0,5,1,"00:21:09,768","00:21:11,769" 440 | 461,You tell them to wait!,Ross,anger,negative,42,1,5,1,"00:21:11,937","00:21:14,230" 441 | 462,Okay. Wait! Wait!,Rachel,neutral,neutral,42,2,5,1,"00:21:13,230","00:21:16,482" 442 | 463,Emily.,Ross,neutral,neutral,42,3,5,1,"00:21:21,154","00:21:23,155" 443 | 464,Oh no-no-no! Oh-no! No! No! Emily!,Ross,anger,negative,42,4,5,1,"00:21:28,036","00:21:34,709" 444 | 465,Hey. Call me when you get there. Okay?,Monica,neutral,neutral,43,0,6,6,"00:19:41,346","00:19:43,431" 445 | 466,Okay.,Rachel,neutral,neutral,43,1,6,6,"00:19:42,431","00:19:43,431" 446 | 467,I know. You're the guy who wouldn't chip in for the handyman.,The Hot Girl,sadness,negative,44,0,5,17,"00:13:12,416","00:13:15,835" 447 | 468,Nevermind!,Ross,anger,negative,44,1,5,17,"00:13:17,630","00:13:18,922" 448 | 469,"No, I-I actually thought it was unfair the way everyone reacted. I mean you had just moved in.",The Hot Girl,neutral,neutral,44,2,5,17,"00:13:19,757","00:13:25,637" 449 | 471,Jen.,The Hot Girl,neutral,neutral,44,3,5,17,"00:13:33,229","00:13:34,854" 450 | 472,"Jen, I know this may sound a little… But uh, would you maybe wanna grab a cup of coffee sometime, or",Ross,neutral,neutral,44,4,5,17,"00:13:33,229","00:13:44,239" 451 | 473,Sure! That would be nice.,Jen,joy,positive,44,5,5,17,"00:13:45,366","00:13:47,116" 452 | 474,Umm?,Ross,neutral,neutral,44,6,5,17,"00:13:47,827","00:13:48,868" 453 | 475,Oh! My number is on there. Give me a call.,Jen,joy,positive,44,7,5,17,"00:13:49,537","00:13:52,622" 454 | 476,I will give you a call.,Ross,neutral,neutral,44,8,5,17,"00:13:52,832","00:13:54,916" 455 | 477,I'll see you later.,Jen,neutral,neutral,44,9,5,17,"0:13:55,084","0:13:56,046" 456 | 478,Okay!,Ross,joy,positive,44,10,5,17,"0:13:56,046","0:13:57,005" 457 | 479,I forgot my paper.,Jen,neutral,neutral,44,11,5,17,"00:14:02,132","00:14:04,259" 458 | 480,"Here we go. Okay, brace yourselves.",Chandler,neutral,neutral,45,0,3,17,"00:08:52,198","00:08:55,283" 459 | 481,What?,Monica,neutral,neutral,45,1,3,17,"00:08:53,658","00:08:55,283" 460 | 482,Okay.,Rachel,neutral,neutral,45,2,3,17,"0:08:56,827","0:08:57,389" 461 | 483,Ow!,Monica,surprise,positive,45,3,3,17,"0:08:57,389","0:08:58,641" 462 | 484,Aren’t you gonna go?,Phoebe,neutral,neutral,45,4,3,17,"0:09:04,961","0:09:05,733" 463 | 485,No. Thank you.,Rachel,neutral,neutral,45,5,3,17,"0:09:05,733","0:09:06,967" 464 | 486,"No, Rachel never pees in public restrooms.",Monica,neutral,neutral,45,6,3,17,"00:09:07,129","00:09:09,839" 465 | 487,"Well, they never have any paper in there y'know. So my rule is ‘no tissue, no tuschy.’ Well, if everybody’s going.",Rachel,neutral,neutral,45,7,3,17,"00:09:10,591","00:09:24,479" 466 | 488,"No, y'know what don’t close it ‘cause the... keys...are in there.",Phoebe,neutral,neutral,45,8,3,17,"00:09:25,606","00:09:27,983" 467 | 489,"Oh, no-no-no-no-no-no!!",Chandler,fear,negative,45,9,3,17,"00:09:28,192","00:09:29,568" 468 | 490,What’s going on?,Joey,neutral,neutral,45,10,3,17,"0:09:30,152","0:09:30,820" 469 | 491,My lighter’s in there!,Chandler,fear,negative,45,11,3,17,"0:09:30,820","0:09:32,729" 470 | 492,I promise.,Rachel,neutral,neutral,46,0,3,8,"00:02:31,442","00:02:32,484" 471 | 493,"Although, don’t feel like you can’t visit.",Phoebe,neutral,neutral,46,1,3,8,"00:02:32,652","00:02:34,570" 472 | 494,"Hey, is, is, is Chandler here?",Joey,neutral,neutral,46,2,3,8,"00:02:37,240","00:02:39,700" 473 | 495,"No, no he’s not.",Ross,neutral,neutral,46,3,3,8,"00:02:41,119","00:02:42,452" 474 | 496,"You guys, Joey just saw Janice kissing her ex-husband.",Monica,surprise,negative,46,4,3,8,"00:02:43,955","00:02:48,584" 475 | 497,"What? So what are you going to do? I mean how, how are you going to tell Chandler?",Ross,surprise,negative,46,5,3,8,"00:02:48,793","00:02:53,213" 476 | 498,"Well, I was thinking about that and I, I think the best way would be, to not.",Joey,neutral,neutral,46,6,3,8,"00:02:53,381","00:02:57,843" 477 | 499,"Joey, you can’t keep this to yourself, if you know about this, you have to tell him.",Rachel,neutral,neutral,46,7,3,8,"00:02:58,761","00:03:02,214" 478 | 500,"It’ll kill him. I mean it’ll, it’ll just kill him.",Joey,fear,negative,46,8,3,8,"00:03:02,182","00:03:04,474" 479 | 501,"Well, you could wait ‘til I go to the dentist, maybe",Phoebe,neutral,neutral,46,9,3,8,"00:03:04,642","00:03:07,519" 480 | 504,"Hey, what are you doing here?",Carol,neutral,neutral,47,0,3,17,"00:12:05,599","00:12:07,642" 481 | 505,"Well, oh just ah, I was just wondering, when you and I split up, did you get the tape that was half the last episode of",Ross,neutral,neutral,47,1,3,17,"00:12:07,893","00:12:14,524" 482 | 506,"Ah yeah, but now it’s Susan and me in Mexico and the hostages coming home.",Carol,neutral,neutral,47,2,3,17,"00:12:18,362","00:12:22,031" 483 | 507,Where’s Ben?,Ross,neutral,neutral,47,3,3,17,"00:12:22,491","00:12:23,533" 484 | 508,He’s sleeping.,Carol,neutral,neutral,47,4,3,17,"00:12:23,743","00:12:24,993" 485 | 509,"Ahh. Ooh, is this a ah, is this a bad time?",Ross,surprise,positive,47,5,3,17,"00:12:24,000","00:12:29,122" 486 | 510,"Umm, yeah, actually, Susan’s gonna be home any minute, it’s kinda an anniversary.",Carol,joy,positive,47,6,3,17,"00:12:29,373","00:12:34,544" 487 | 511,"Oh! I thought you guys got married in uh, January?",Ross,surprise,negative,47,7,3,17,"00:12:34,712","00:12:37,172" 488 | 512,It’s not that kind of anniversary.,Carol,neutral,neutral,47,8,3,17,"00:12:37,381","00:12:39,090" 489 | 513,Ah! Oh.,Ross,surprise,negative,47,9,3,17,"00:12:39,300","00:12:42,242" 490 | 514,Sooo!! Anyway...,Carol,neutral,neutral,47,10,3,17,"00:12:42,939","00:12:45,638" 491 | 515,Where are we gonna find a tiny little hat?,Monica,neutral,neutral,48,0,3,8,"00:06:08,284","00:06:13,121" 492 | 516,"Oh, oh, oh, I’ll get ‘Rainy Day Bear’!!",Rachel,joy,positive,48,1,3,8,"00:06:13,289","00:06:14,956" 493 | 517,"Because he’ll know what to do? Oh my God, you’re a genius!",Monica,joy,positive,48,2,3,8,"00:06:15,124","00:06:19,378" 494 | 518,"Oh God, oh God, it’s sowed on though.",Rachel,fear,negative,48,3,3,8,"00:06:19,545","00:06:21,463" 495 | 519,Give it. Give it.,Monica,neutral,neutral,48,4,3,8,"00:06:21,631","00:06:23,090" 496 | 520,Okay.,Rachel,neutral,neutral,48,5,3,8,"00:06:22,090","00:06:23,090" 497 | 521,Oh!!,Monica and Rachel,surprise,negative,48,6,3,8,"00:06:23,466","00:06:24,674" 498 | 522,"Oh, it’s just like a bloodbath in here today.",Rachel,sadness,negative,48,7,3,8,"00:06:27,303","00:06:30,806" 499 | 523,Please. This is so your fault.,Ross,anger,negative,49,0,1,23,"0:09:14,804","0:09:18,446" 500 | 524,"How, how is this my fault?",Susan,surprise,negative,49,1,1,23,"0:09:18,446","0:09:18,602" 501 | 525,"Look, Carol never threw me out of a room before you came along.",Ross,anger,negative,49,2,1,23,"00:09:18,724","00:09:21,685" 502 | 526,"Yeah? Well, there's a lot of things Carol never did before I came along.",Susan,anger,negative,49,3,1,23,"00:09:21,894","00:09:25,480" 503 | 531,"Hey, hey, ok, all right, that's it!",Phoebe,anger,negative,49,6,1,23,"00:09:29,735","00:09:33,947" 504 | 532,Get in here.,Phoebe,anger,negative,49,7,1,23,"00:09:32,947","00:09:34,447" 505 | 533,Come on.,Phoebe,neutral,neutral,49,8,1,23,"00:09:33,447","00:09:34,447" 506 | 534,"My god, you guys, I don't believe you.",Phoebe,anger,negative,49,9,1,23,"00:09:34,615","00:09:38,410" 507 | 535,There are children coming into the world in this very building and your negative fighting noises are not the first thing they should be hearing.,Phoebe,anger,negative,49,10,1,23,"00:09:38,578","00:09:45,458" 508 | 536,"So just stop all the yelling, just stop it!",Phoebe,anger,negative,49,11,1,23,"00:09:45,626","00:09:48,086" 509 | 537,"Yeah, Susan.",Ross,neutral,neutral,49,12,1,23,"00:09:48,296","00:09:50,714" 510 | 538,"Don't make me do this again, I don't like my voice like this.",Phoebe,anger,negative,49,13,1,23,"00:09:50,881","00:09:54,593" 511 | 539,"Ok, who wants to hear something ironic?",Phoebe,neutral,neutral,49,14,1,23,"00:09:59,807","00:10:02,225" 512 | 540,"Oh! Here it is! Ooh, Joey! Why did you sign it, ""Son of a bitch?""",Phoebe,surprise,negative,50,0,6,22,"00:16:55,597","00:17:00,101" 513 | 541,I didn’t do that! Who would’ve done that?!,Joey,surprise,negative,50,1,6,22,"0:17:03,439","0:17:05,671" 514 | 542,Son of a bitch!,The Dry Cleaner,anger,negative,50,2,6,22,"0:17:05,671","0:17:06,747" 515 | 543,"Okay, maybe ask this guy.",Phoebe,neutral,neutral,50,3,6,22,"00:17:07,317","00:17:09,527" 516 | 544,"Oh, did I not mention? Carl is a guy I hired to be my identical twin for a medical research project.",Joey,neutral,neutral,51,0,6,17,"00:14:57,062","00:15:05,153" 517 | 545,"Y’know sometimes the good ideas are just right in front of you, aren’t they?",Chandler,joy,positive,51,1,6,17,"00:15:07,907","00:15:11,618" 518 | 546,"Okay, I know it sounds crazy, but I think it might work. Y’know? The only problem is, Carl’s acting is",Joey,neutral,neutral,51,2,6,17,"00:15:11,785","00:15:16,998" 519 | 547,The,Monica,neutral,neutral,51,3,6,17,"00:15:17,166","00:15:19,417" 520 | 548,"Yeah, he’s the reason I didn’t get that big",Joey,neutral,neutral,51,4,6,17,"00:15:20,169","00:15:23,963" 521 | 549,"Hey, uh can I get a little piece of that cake?",Carl,neutral,neutral,51,5,6,17,"00:15:27,217","00:15:29,844" 522 | 550,Pizza!! We like Pizza!! Get out!!!,Joey,anger,negative,51,6,6,17,"00:15:30,054","00:15:33,014" 523 | 551,"Hey Monica, there’s a customer who wants to complement the chef, should I let him in?",Waitress,neutral,neutral,52,0,6,24,"00:20:36,109","00:20:39,528" 524 | 552,"Sure, I love this part!",Monica,joy,positive,52,1,6,24,"00:20:39,696","00:20:42,073" 525 | 553,Come on in.,Waitress,neutral,neutral,52,2,6,24,"00:20:42,741","00:20:45,159" 526 | 554,"Really? In the moment, I really wanted to kiss you too. In the moment.",Joey,joy,positive,53,0,6,10,"00:19:45,559","00:19:52,440" 527 | 555,"In the moment, yeah.",Janine,neutral,neutral,53,1,6,10,"00:19:52,983","00:19:54,000" 528 | 556,But only in the moment. So do ya wanna kiss again?,Joey,joy,positive,53,2,6,10,"00:19:53,983","00:20:01,616" 529 | 557,"Sure, New Year’s Eve is only two weeks away. Can you wait?",Janine,neutral,neutral,53,3,6,10,"00:20:02,451","00:20:06,996" 530 | 558,No.,Joey,neutral,neutral,53,4,6,10,"00:20:07,456","00:20:08,873" 531 | 559,Me neither.,Janine,neutral,neutral,53,5,6,10,"00:20:10,751","00:20:11,959" 532 | 560,"3, 2,",Joey,neutral,neutral,53,6,6,10,"00:20:15,088","00:20:17,024" 533 | 561,"Joey, you don’t have to count down every time we kiss.",Janine,joy,positive,53,7,6,10,"00:20:18,175","00:20:20,468" 534 | 562,"Uh, yeah, okay. Except I sorta felt like I needed a couple of seconds to get ready.",Joey,joy,positive,53,8,6,10,"00:20:20,719","00:20:28,684" 535 | 565,Alright. Phoebe?,Monica,neutral,neutral,54,0,1,4,"0:00:03,420","0:00:04,382" 536 | 566,"Okay, okay.",Phoebe,neutral,neutral,54,1,1,4,"0:00:04,382","0:00:05,298" 537 | 567,"If I were omnipotent for a day, I would want, um, world peace, no more hunger, good things for the rain-forest...And bigger boobs!",Phoebe,joy,positive,54,2,1,4,"00:00:05,422","00:00:15,556" 538 | 568,"Yeah, see.. you took mine. Chandler, what about you?",Ross,neutral,neutral,54,3,1,4,"00:00:17,100","00:00:22,438" 539 | 569,"Uh, if I were omnipotent for a day, I'd.. make myself omnipotent forever.",Chandler,neutral,neutral,54,4,1,4,"00:00:22,605","00:00:26,025" 540 | 570,"See, there's always one guy. ""If I had a wish, I'd wish for three more wishes.""",Rachel,disgust,negative,54,5,1,4,"00:00:26,234","00:00:31,405" 541 | 571,"Hey Joey. Hi. Hey, buddy.",All,neutral,neutral,54,6,1,4,"00:00:34,075","00:00:35,534" 542 | 572,"Hey, Joey, what would you do if you were omnipotent?",Monica,neutral,neutral,54,7,1,4,"00:00:35,702","00:00:37,828" 543 | 573,Probably kill myself!,Joey,sadness,negative,54,8,1,4,"00:00:38,538","00:00:40,831" 544 | 574,..Excuse me?,Monica,surprise,positive,54,9,1,4,"00:00:41,791","00:00:43,250" 545 | 575,"Hey, if Little Joey's dead, then I got no reason to live!",Joey,sadness,negative,54,10,1,4,"00:00:43,418","00:00:47,087" 546 | 576,"Joey, uh-",Ross,surprise,positive,54,11,1,4,"00:00:49,090","00:00:51,383" 547 | 577,You,Joey,neutral,neutral,54,12,1,4,"00:00:53,094","00:00:55,054" 548 | 578,I’m sorry.,Kate,sadness,negative,55,0,6,1,"00:03:46,100","00:03:48,769" 549 | 579,"Joey, onstage!",Stage Manager,anger,negative,56,0,3,22,"00:19:48,103","00:19:50,354" 550 | 580,Well can you at least stay to the end of the play?,Joey,sadness,negative,56,1,3,22,"00:19:51,106","00:19:53,274" 551 | 581,"I mean, I’ll go to the airport with ya, I-I wanna say good bye.",Joey,sadness,negative,56,2,3,22,"00:19:53,442","00:19:56,227" 552 | 582,Where are you Vic?,Lauren,neutral,neutral,56,3,3,22,"00:19:56,445","00:19:58,362" 553 | 583,Flight’s in an hour. I-I gotta go.,Kate,sadness,negative,56,4,3,22,"00:19:58,530","00:20:00,698" 554 | 584,Vic! Vic!,Lauren,anger,negative,56,5,3,22,"00:20:00,866","00:20:02,325" 555 | 585,In a minute!!,Joey,anger,negative,56,6,3,22,"00:20:05,454","00:20:07,455" 556 | 586,So this is it? Victor?,Lauren,sadness,negative,56,7,3,22,"00:20:09,583","00:20:11,959" 557 | 587,"Yeah, I guess it is.",Joey,sadness,negative,56,8,3,22,"00:20:12,794","00:20:15,755" 558 | 588,"Listen, I ah, I gotta say good bye, and-and I gotta say it quick ‘cause this is killing me.",Joey,sadness,negative,56,9,3,22,"00:20:21,970","00:20:28,643" 559 | 589,"One thing you gotta know, is that I will never forget you.",Joey,sadness,negative,56,10,3,22,"00:20:29,311","00:20:33,898" 560 | 590,"But, you’ve got things you have to do now, and so do I.",Joey,sadness,negative,56,11,3,22,"00:20:34,149","00:20:39,320" 561 | 591,"And so… I’m gonna get on this spaceship, and I’m gonna go to Blargon 7 in search of alternative fuels.",Joey,sadness,negative,56,12,3,22,"00:20:40,989","00:20:57,797" 562 | 592,"But when I return, 200 years from now, you’ll be long gone.",Joey,sadness,negative,56,13,3,22,"00:20:59,508","00:21:05,471" 563 | 593,But I won’t have aged at all.,Joey,neutral,neutral,56,14,3,22,"00:21:06,098","00:21:08,557" 564 | 594,"So you tell your great-great-granddaughter to look me up, because Adrienne, baby, I’m gonna want to meet her.",Joey,neutral,neutral,56,15,3,22,"00:21:11,823","00:21:26,534" 565 | 595,"So long, Vic!",Lauren,sadness,negative,56,16,3,22,"00:21:34,293","00:21:36,585" 566 | 597,Nooo Way! The most romantic song ever is,Rachel,neutral,neutral,57,0,3,1,"00:01:14,616","00:01:18,994" 567 | 598,"See, I-I think that one that Elton John wrote for, um, that guy on",Phoebe,neutral,neutral,57,1,3,1,"00:01:19,162","00:01:24,333" 568 | 599,"What song was that, Pheebs?",Rachel,neutral,neutral,57,2,3,1,"00:01:26,336","00:01:28,295" 569 | 600,Hi Monica!,Phoebe,joy,positive,57,3,3,1,"00:01:36,513","00:01:37,846" 570 | 601,Hey Mon!,Ross,joy,positive,57,4,3,1,"0:01:38,014","0:01:38,807" 571 | 602,Hey Mon!,Rachel,joy,positive,57,5,3,1,"0:01:38,807","0:01:39,754" 572 | 603,"Oh my God, has she slept at all?",Phoebe,surprise,negative,57,6,3,1,"00:01:41,559","00:01:44,978" 573 | 604,Nope.,Ross,neutral,neutral,57,7,3,1,"00:01:43,144","00:01:44,978" 574 | 605,"No, it's been three nights in a row.",Rachel,neutral,neutral,57,8,3,1,"00:01:45,146","00:01:47,064" 575 | 606,"Yeah, she finally stopped crying yesterday, but then she found one of Richard's cigar butts out on the terrace, so.",Ross,neutral,neutral,57,9,3,1,"00:01:47,232","00:01:52,361" 576 | 607,"Oh, okay that explains it.",Phoebe,neutral,neutral,57,10,3,1,"00:01:52,529","00:01:56,949" 577 | 608,"I got a call at two in the morning, but all I could hear was, like, this high squeaky sound, so I thought okay its like a mouse or a opossum.",Phoebe,neutral,neutral,57,11,3,1,"00:01:52,529","00:02:02,204" 578 | 609,But then I realized where would a mouse or a opossum get the money to make the phone call.,Phoebe,joy,positive,57,12,3,1,"00:02:03,873","00:02:11,421" 579 | 610,"So uh, man, are you gonna go to the play with me tonight?",Chandler,neutral,neutral,58,0,4,13,"00:05:01,050","00:05:03,552" 580 | 611,"Y’know what, I don’t know how comfortable I am going to see how hot the sex is between some guy and your girlfriend.",Ross,disgust,negative,58,1,4,13,"00:05:03,720","00:05:09,558" 581 | 612,"Yeah, I know but",Chandler,neutral,neutral,58,2,4,13,"0:05:10,143","0:05:11,575" 582 | 613,"Oh no-no-no, I’m there.",Ross,neutral,neutral,58,3,4,13,"0:05:11,575","0:05:12,320" 583 | 614,Hey!,Monica,surprise,positive,58,4,4,13,"00:05:14,731","00:05:15,814" 584 | 615,Hey Mon! Want some pancakes?,Joey,joy,positive,58,5,4,13,"00:05:14,731","00:05:18,150" 585 | 616,You made pancakes?,Monica,surprise,positive,58,6,4,13,"00:05:15,982","00:05:18,150" 586 | 617,Yep! Grab a plate.,Joey,joy,positive,58,7,4,13,"00:05:18,318","00:05:20,110" 587 | 619,"No-no, stay right there. Gettin’ closer.",Joey,neutral,neutral,58,8,4,13,"00:05:21,988","00:05:27,784" 588 | 620,"Okay, okay, but don’t worry, because we also have cereals, muffins, waffles,",Chandler,neutral,neutral,58,9,4,13,"00:05:29,537","00:05:33,749" 589 | 621,"Listen also we’re uh, we’re watching the game here Saturday night, if people want to come over.",Joey,neutral,neutral,58,10,4,13,"00:05:39,589","00:05:42,674" 590 | 622,Oh yeah!,Ross,joy,positive,58,11,4,13,"00:05:42,842","00:05:43,925" 591 | 623,"Yes, if the foxhole was lined with sandwiches.",Chandler,neutral,neutral,59,0,5,20,"00:21:42,592","00:21:45,344" 592 | 624,"Yeah, hero sandwiches.",Joey,neutral,neutral,59,1,5,20,"00:21:46,638","00:21:48,848" 593 | 625,Well you all know that I'm a pacifist so I'm not interested in war in any way.,Phoebe,neutral,neutral,59,2,5,20,"00:21:51,310","00:21:55,813" 594 | 627,"When the revolution comes, I will have to destroy you all.",Phoebe,neutral,neutral,59,3,5,20,"00:21:56,064","00:21:59,358" 595 | 628,Not you Joey.,Phoebe,neutral,neutral,59,4,5,20,"00:22:00,569","00:22:01,861" 596 | 629,Oh my good God.,Chandler,surprise,positive,60,0,6,17,"00:17:15,534","00:17:18,036" 597 | 630,"Hey! Continuing the countdown of your favorite meals. Tonight, No. 3, macaroni and cheese with cut up hot dogs.",Monica,neutral,neutral,60,1,6,17,"00:17:18,871","00:17:30,798" 598 | 631,"Look, you have done enough! Okay? You have to stop this now.",Chandler,anger,negative,60,2,6,17,"00:17:32,551","00:17:36,012" 599 | 632,"I will! But not tonight. For dinner music, I thought we could listen to that tape you made me.",Monica,joy,positive,60,3,6,17,"00:17:36,180","00:17:42,560" 600 | 633,"Oh, the mixed tape.",Chandler,neutral,neutral,60,4,6,17,"00:17:42,728","00:17:44,520" 601 | 634,The Way You Look Tonight,Monica,joy,positive,60,5,6,17,"00:17:45,731","00:17:48,107" 602 | 635,You are just the sweetest.,Monica,joy,positive,60,6,6,17,"00:18:16,136","00:18:19,055" 603 | 637,Hey!,Monica,joy,positive,61,0,3,21,"0:12:46,891","0:12:47,225" 604 | 638,Hey!,Phoebe,joy,positive,61,1,3,21,"0:12:47,225","0:12:48,632" 605 | 639,"Hey, guess what I’m doing tonight.",Monica,neutral,neutral,61,2,3,21,"00:12:48,726","00:12:50,393" 606 | 640,What?,Phoebe,neutral,neutral,61,3,3,21,"00:12:49,393","00:12:50,393" 607 | 641,I’m checking out the restaurant with Pete.,Monica,neutral,neutral,61,4,3,21,"00:12:50,603","00:12:52,562" 608 | 642,"Ohh, Monica, I am so excited for you.",Phoebe,joy,positive,61,5,3,21,"00:12:52,730","00:12:56,232" 609 | 644,"So honey this uh, this threesome thing umm, I mean how-how are you gonna start to find",Ross,neutral,neutral,62,0,6,16,"00:00:50,924","00:00:59,058" 610 | 645,"Ooh, actually I’ve been making a list of all the women I know who might be into doing this!",Carol,joy,positive,62,1,6,16,"00:00:59,309","00:01:03,020" 611 | 646,"Oh. Wow! Huh. Boy! Well, someone’s been doing their homework.",Ross,surprise,positive,62,2,6,16,"00:01:05,090","00:01:18,285" 612 | 647,"Yeah. Ooh, and I know Gail Rosten is in there twice, but she is so",Carol,neutral,neutral,62,3,6,16,"00:01:18,661","00:01:22,926" 613 | 648,"Oh, I know. Y’know, just-just talking about it is getting me kinda",Ross,neutral,neutral,62,4,6,16,"00:01:23,124","00:01:30,964" 614 | 649,"Oh, me too.",Carol,neutral,neutral,62,5,6,16,"00:01:31,132","00:01:33,258" 615 | 650,"and then, we could’ve gone from the ceremony to the reception with you in the sidecar!",Ross,joy,positive,63,0,8,18,"00:19:36,622","00:19:42,794" 616 | 651,"Ross, it just wouldn’t have been feasible.",Rachel,neutral,neutral,63,1,8,18,"00:19:43,003","00:19:44,838" 617 | 652,But having a dove place the ring on your finger would’ve been no problem?,Ross,anger,negative,63,2,8,18,"00:19:45,088","00:19:49,593" 618 | 653,It was really fun being married to you tonight.,Rachel,joy,positive,63,3,8,18,"00:19:52,137","00:19:54,056" 619 | 654,"Yeah! And! And, it was the easiest 400 bucks I’ve ever made.",Ross,joy,positive,63,4,8,18,"00:19:54,222","00:19:57,351" 620 | 655,"Okay Ross, can I uh, can I ask you something?",Rachel,sadness,negative,63,5,8,18,"0:19:58,935","0:20:01,747" 621 | 656,Yeah.,Ross,neutral,neutral,63,6,8,18,"0:20:01,747","0:20:02,499" 622 | 657,"That proposal, at the planetarium",Rachel,neutral,neutral,63,7,8,18,"0:20:02,689","0:20:04,951" 623 | 658,"I know, I know it was stupid.",Ross,sadness,negative,63,8,8,18,"0:20:04,951","0:20:07,383" 624 | 659,Are you kidding?!,Rachel,surprise,positive,63,9,8,18,"0:20:07,527","0:20:08,278" 625 | 660,"With the, with the lilies, and-and the song, and the stars!",Rachel,joy,positive,63,10,8,18,"0:20:08,278","0:20:13,534" 626 | 661,It was…really wonderful!,Rachel,joy,positive,63,11,8,18,"0:20:13,617","0:20:16,959" 627 | 662,Did you just make that up?,Rachel,surprise,positive,63,12,8,18,"0:20:16,959","0:20:18,759" 628 | 663,"No, actually I thought about it when, when we were going out.",Ross,neutral,neutral,63,13,8,18,"00:20:19,039","00:20:22,167" 629 | 664,"It’s how I imagined I uh, I would ask you to marry me.",Ross,neutral,neutral,63,14,8,18,"00:20:22,376","00:20:27,130" 630 | 665,"Well, that would’ve been very hard to say no too.",Rachel,neutral,neutral,63,15,8,18,"00:20:30,550","00:20:35,055" 631 | 666,"It’s a good thing I didn’t do it, because it sounds like it would’ve been a very expensive wedding. Okay, good night",Ross,neutral,neutral,63,16,8,18,"00:20:38,016","00:20:53,407" 632 | 667,Goodnight,Rachel,neutral,neutral,63,17,8,18,"00:20:52,407","00:20:53,407" 633 | 668,Even if the sidecar had a windscreen so your hair wouldn’t get messed up?,Ross,neutral,neutral,63,18,8,18,"00:20:55,909","00:21:00,664" 634 | 669,I will think about it.,Rachel,neutral,neutral,63,19,8,18,"0:21:00,872","0:21:01,754" 635 | 670,That’s all I’m askin’,Ross,neutral,neutral,63,20,8,18,"0:21:01,754","0:21:04,265" 636 | 671,"You guys! It was bananas, cream, and beef! I-I just cannot believe that you ate that so that I wouldn’t feel bad!",Rachel,surprise,positive,64,0,6,9,"00:22:05,365","00:22:14,623" 637 | 672,"Well actually, I-I didn’t eat mine. It’s still in the bathroom.",Monica,joy,positive,64,1,6,9,"00:22:14,833","00:22:18,085" 638 | 673,"No it isn’t, I ate that.",Joey,neutral,neutral,64,2,6,9,"00:22:18,295","00:22:19,295" 639 | 674,Well we left ours in Monica’s bedroom.,Mrs. Geller,neutral,neutral,64,3,6,9,"00:22:22,049","00:22:24,133" 640 | 675,"Nope, got it and I got yours too.",Joey,neutral,neutral,64,4,6,9,"00:22:24,343","00:22:26,635" 641 | 677,And that’s I’m so glad… there’s no problem.,Rachel,joy,positive,65,0,4,9,"00:04:17,006","00:04:19,216" 642 | 678,"That’s fine, actually I’m on the hiring committee, so there’ll be at least one friendly face.",Joanna,neutral,neutral,65,1,4,9,"00:04:19,842","00:04:23,845" 643 | 679,Ohh! That’s great!,Rachel,joy,positive,65,2,4,9,"00:04:24,013","00:04:25,430" 644 | 680,"You know, Junior Miss is where I started. Oh, I had to sleep with the",Joanna,neutral,neutral,65,3,4,9,"00:04:25,598","00:04:31,603" 645 | 681,Really?!,Rachel,surprise,positive,65,4,4,9,"0:04:32,689","0:04:33,541" 646 | 682,No-ho-ho!,Joanna,joy,positive,65,5,4,9,"0:04:33,541","0:04:36,295" 647 | 683,Yeah.,Joanna,neutral,neutral,65,6,4,9,"00:04:36,401","00:04:37,985" 648 | 684,"I mean, no-no-no-no-no, don’t you worry, I’m sure with your qualifications you won’t need to sleep with some guy to get that job.",Joanna,neutral,neutral,65,7,4,9,"00:04:38,987","00:04:45,200" 649 | 685,"Although, I might need some convincing.",Joanna,neutral,neutral,65,8,4,9,"00:04:46,577","00:04:48,704" 650 | 686,"Well, I, umm",Rachel,fear,negative,65,9,4,9,"00:04:50,873","00:04:51,873" 651 | 687,"Kidding! God, I feel wild today!",Joanna,joy,positive,65,10,4,9,"00:04:51,873","00:04:57,254" 652 | 688,Oh my God! Chandler just left though!,Phoebe,surprise,negative,66,0,7,23,"00:14:35,291","00:14:38,334" 653 | 689,"Yeah but, maybe it’s not what we think. Maybe it’s tell Monica I’m sorry I…drank the last of the milk.",Rachel,neutral,neutral,66,1,7,23,"00:14:38,586","00:14:45,216" 654 | 690,"Or maybe he-he was writing to tell her that-that he’s changed his name, y’know? Tell Monica I’m sorry.",Phoebe,neutral,neutral,66,2,7,23,"00:14:45,676","00:14:54,048" 655 | 691,I think it means he freaked out and left!,Ross,surprise,negative,66,3,7,23,"00:14:56,020","00:15:01,065" 656 | 692,Don’t be so negative! Good God! Isn’t it possible that Sorry is sitting in there right now?!,Phoebe,anger,negative,66,4,7,23,"00:15:01,525","00:15:06,905" 657 | 693,"Okay. Phoebe, I-I think Ross is right. What are we gonna do?",Rachel,sadness,negative,66,5,7,23,"00:15:08,032","00:15:12,035" 658 | 694,"Look—Okay, I’m just gonna—I’m gonna have to go find him and bring him back!",Ross,neutral,neutral,66,6,7,23,"00:15:12,369","00:15:15,872" 659 | 695,Okay?,Ross,neutral,neutral,66,7,7,23,"0:15:16,081","0:15:16,503" 660 | 696,"You-you make sure Monica does not find out, okay?",Ross,neutral,neutral,66,8,7,23,"0:15:16,503","0:15:19,673" 661 | 699,"I will, I will find him.",Ross,neutral,neutral,66,11,7,23,"00:15:29,345","00:15:31,179" 662 | 700,Hey!,Rachel,joy,positive,67,0,6,19,"0:01:59,953","0:02:01,205" 663 | 701,Hi! Hey!,All,joy,positive,67,1,6,19,"0:02:01,205","0:02:01,361" 664 | 702,Do you guys know any cute guys?,Rachel,neutral,neutral,67,2,6,19,"00:02:01,454","00:02:04,289" 665 | 703,"Well, of course I do! My good friend Joey over here.",Chandler,joy,positive,67,3,6,19,"00:02:04,457","00:02:07,417" 666 | 704,"Oh, I’m sorry. Thank you Chandler.",Joey,joy,positive,67,4,6,19,"00:02:10,839","00:02:14,299" 667 | 705,"Anyway, there’s this big charity ball this weekend and Ralph Lauren bought a table, so I kinda have to go",Rachel,neutral,neutral,67,5,6,19,"00:02:15,635","00:02:21,056" 668 | 706,What’s the charity?,Monica,neutral,neutral,67,6,6,19,"00:02:21,224","00:02:22,350" 669 | 707,"I don’t know, something either trees or disease—Ralph mumbles a lot.",Rachel,neutral,neutral,67,7,6,19,"00:02:22,000","00:02:30,899" 670 | 708,Does Ralph mumble when you’re not paying attention?,Monica,neutral,neutral,67,8,6,19,"00:02:27,772","00:02:34,528" 671 | 709,Yeah! It’s weird. But the thing is need to find a date.,Rachel,surprise,positive,67,9,6,19,"00:02:31,067","00:02:37,573" 672 | 710,"Well, what kind of guy are you looking for?",Phoebe,neutral,neutral,67,10,6,19,"00:02:37,740","00:02:39,408" 673 | 711,Hey!,Rachel,joy,positive,68,0,6,21,"00:02:18,012","00:02:19,054" 674 | 712,What are you guys doing later?,Ross,neutral,neutral,68,1,6,21,"00:02:19,222","00:02:20,973" 675 | 713,"Oh, Rachel and I have appointments to get our hair cut.",Phoebe,neutral,neutral,68,2,6,21,"00:02:21,141","00:02:23,475" 676 | 714,We do?,Rachel,surprise,negative,68,3,6,21,"0:02:24,102","0:02:24,404" 677 | 715,I want to see what he wants first.,Phoebe,neutral,neutral,68,4,6,21,"0:02:24,404","0:02:26,706" 678 | 717,I just found out that Elizabeth’s dad wants to meet me.,Ross,sadness,negative,68,5,6,21,"00:02:28,064","00:02:30,774" 679 | 718,"Wait a minute, hold the phone! You’re not Elizabeth’s dad?!",Chandler,surprise,positive,68,6,6,21,"00:02:30,942","00:02:35,070" 680 | 719,"Come on guys, I-I really want this guy to like me.",Ross,fear,negative,68,7,6,21,"00:02:38,449","00:02:40,742" 681 | 720,It-it would really help me out if you guys were here to make me look good.,Ross,sadness,negative,68,8,6,21,"00:02:40,910","00:02:45,831" 682 | 721,Of course we’ll help! Yeah! We’ll be here!,All,joy,positive,68,9,6,21,"00:02:43,663","00:02:47,541" 683 | 722,Thanks!,Ross,joy,positive,68,10,6,21,"00:02:45,999","00:02:47,541" 684 | 723,We know how tough those parent/teacher conferences can be.,Monica,neutral,neutral,68,11,6,21,"00:02:47,709","00:02:50,544" 685 | 724,"Oh, hi! How are you doing?",Rachel,joy,positive,69,0,7,8,"00:19:38,969","00:19:41,000" 686 | 725,I'm okay. I gotta go down to the police station and look at mug shots.,Tag,sadness,negative,69,1,7,8,"00:19:40,888","00:19:45,099" 687 | 727,"Thanks for having me over, you guys.",Tag,neutral,neutral,69,2,7,8,"0:19:45,309","0:19:46,728" 688 | 728,Tag?,Ross,neutral,neutral,69,3,7,8,"0:19:46,728","0:19:49,508" 689 | 730,Y-You're going?,Ross,joy,positive,69,4,7,8,"00:19:45,309","00:19:49,437" 690 | 731,"Uh we didn't, uh we didn't get the chance to talk.",Ross,neutral,neutral,69,5,7,8,"00:19:49,605","00:19:52,023" 691 | 732,"Uh, so, where did you say you're from again?",Ross,neutral,neutral,69,6,7,8,"00:19:52,274","00:19:54,650" 692 | 733,Colorado.,Tag,neutral,neutral,69,7,7,8,"0:19:54,860","0:19:55,672" 693 | 734,"Ah, what good are you.",Ross,neutral,neutral,69,8,7,8,"0:19:55,672","0:19:57,378" 694 | 735,"Look, um, I think we should talk about what happened on the terrace.",Rachel,neutral,neutral,69,9,7,8,"00:20:03,619","00:20:07,496" 695 | 736,Okay.,Tag,neutral,neutral,69,10,7,8,"00:20:07,706","00:20:09,081" 696 | 737,"Ah, I-I never should have said what I said.",Rachel,sadness,negative,69,11,7,8,"00:20:09,249","00:20:11,000" 697 | 738,It—y’know what?,Rachel,neutral,neutral,69,12,7,8,"0:20:11,168","0:20:11,920" 698 | 739,It just doesn't matter how I feel.,Rachel,sadness,negative,69,13,7,8,"0:20:11,920","0:20:13,260" 699 | 740,"I mean we work together, so nothing could really ever happen between us, and what I would love is just to go to work on Monday, and-and never talk about this again, okay?",Rachel,sadness,negative,69,14,7,8,"00:20:13,378","00:20:28,309" 700 | 741,"Um, I'm not.",Tag,neutral,neutral,69,15,7,8,"00:20:28,518","00:20:30,686" 701 | 742,"Oh, god, I knew it, that I freaked you out.",Rachel,sadness,negative,69,16,7,8,"00:20:30,896","00:20:34,232" 702 | 743,"No, you didn't. The only thing that freaked me out was you saying that nothing could ever happen between us.",Tag,sadness,negative,69,17,7,8,"00:20:32,232","00:20:38,694" 703 | 744,Really?,Rachel,surprise,positive,69,18,7,8,"00:20:39,738","00:20:41,000" 704 | 745,"Yeah, so, please don't fire me for doing this.",Tag,sadness,negative,69,19,7,8,"00:20:41,000","00:20:45,409" 705 | 746,"Get him! GET HIM! Get him! Get- YESSS! Not laughing now, are ya pal!",Ross,anger,negative,70,0,1,4,"00:12:16,944","00:12:23,575" 706 | 747,"See buddy, that's all you need, a bunch of toothless guys hitting each other with sticks.",Chandler,neutral,neutral,70,1,1,4,"00:12:23,743","00:12:27,370" 707 | 748,Pass it! Pass it!,Ross,joy,positive,70,2,1,4,"00:12:27,538","00:12:29,831" 708 | 749,He's open!,Chandler,joy,positive,70,3,1,4,"0:12:29,999","0:12:30,511" 709 | 750,Shoot! Shoot! Shoot!,All,joy,positive,70,4,1,4,"0:12:30,511","0:12:33,925" 710 | 751,"Hey, look, we're on that TV thing!",Chandler,surprise,positive,70,5,1,4,"00:12:39,842","00:12:43,178" 711 | 752,I am so psyched I kept this chair for myself!,Rachel,joy,positive,71,0,7,13,"00:13:07,620","00:13:11,331" 712 | 753,"Yeah, me too.",Joey,neutral,neutral,71,1,7,13,"00:13:15,169","00:13:17,253" 713 | 756,"Yeah? Wow! Y’know, that this thing has speakers in the headrest!",Rachel,surprise,positive,71,2,7,13,"00:13:19,715","00:13:23,218" 714 | 757,No. Really?,Joey,surprise,negative,71,3,7,13,"00:13:24,929","00:13:26,346" 715 | 758,Yeah! You can hook it up to your TV,Rachel,joy,positive,71,4,7,13,"00:13:26,514","00:13:29,015" 716 | 759,My chair heals itself.,Joey,neutral,neutral,71,5,7,13,"00:13:34,563","00:13:36,731" 717 | 760,"Tiger! Dragon! Iceberg!! Joseph, did you even study at all last night?",Phoebe,anger,negative,72,0,5,11,"00:10:55,738","00:11:03,578" 718 | 761,"Yes! Yes, I did.",Joey,sadness,negative,72,1,5,11,"0:11:03,746","0:11:05,373" 719 | 762,Then do Iceberg!,Phoebe,anger,negative,72,2,5,11,"0:11:05,373","0:11:06,557" 720 | 763,G-sharp.,Joey,neutral,neutral,72,3,5,11,"0:11:07,875","0:11:08,627" 721 | 764,G,Phoebe,neutral,neutral,72,4,5,11,"0:11:08,627","0:11:10,799" 722 | 765,What?! I didn't touch a guitar!,Joey,surprise,negative,72,5,5,11,"00:11:20,471","00:11:22,555" 723 | 766,"No, but you're questioning my method!",Phoebe,anger,negative,72,6,5,11,"00:11:22,273","00:11:24,432" 724 | 767,"No, I'm not questioning it, I'm saying it's stupid! What?!",Joey,anger,negative,72,7,5,11,"00:11:24,600","00:11:30,021" 725 | 768,Thank you.,Monica,neutral,neutral,72,8,5,11,"00:11:32,066","00:11:33,525" 726 | 769,Y'know none of my other student thought I was stupid.,Phoebe,anger,negative,72,9,5,11,"00:11:34,110","00:11:39,155" 727 | 770,"Your other student, was you!",Joey,anger,negative,72,10,5,11,"00:11:39,657","00:11:42,617" 728 | 771,"Yeah, well, y'know maybe you just need to try a little harder!",Phoebe,anger,negative,72,11,5,11,"00:11:43,911","00:11:47,914" 729 | 772,"Look, maybe I need to try a real teacher!",Joey,anger,negative,72,12,5,11,"00:11:48,082","00:11:49,833" 730 | 773,Right here!,Joey,anger,negative,72,13,5,11,"0:11:49,833","0:11:50,751" 731 | 774,Here!,Joey,anger,negative,72,14,5,11,"0:11:50,751","0:11:52,943" 732 | 775,"Andy Cooper, he teaches guitar and look ooh, there's a nice picture of him with a little kid and",Joey,neutral,neutral,72,15,5,11,"00:11:50,000","00:11:55,338" 733 | 776,Fine! You go learn from your qualified instructor! But don't come crying to me when everyone's sick and tired of hearing you play,Phoebe,anger,negative,72,16,5,11,"00:12:00,177","00:12:09,811" 734 | 777,"""Baddest man in the whole damn town.""",Rachel,neutral,neutral,72,17,5,11,"00:12:11,230","00:12:13,606" 735 | 778,"Oh, fine! Take his side!",Phoebe,anger,negative,72,18,5,11,"00:12:13,774","00:12:16,234" 736 | 779,"And shame on you! You should know better, Joey needs to work. Now come on!",Ross,anger,negative,73,0,5,10,"00:10:28,461","00:10:34,257" 737 | 780,Hey!,Joey,anger,negative,73,1,5,10,"00:10:33,257","00:10:34,257" 738 | 781,No! Ah-ah-ah-ah-ah! You can have this back when the five pages are done! Ahh!,Ross,anger,negative,73,2,5,10,"00:10:34,425","00:10:38,762" 739 | 782,Hi!,Rachel,joy,positive,74,0,8,3,"0:09:12,969","0:09:13,637" 740 | 783,Hi.,Ross,neutral,neutral,74,1,8,3,"0:09:13,637","0:09:14,448" 741 | 784,"Hi. Umm, I think there’s something that we really need to talk about.",Rachel,joy,positive,74,2,8,3,"00:09:14,679","00:09:20,141" 742 | 785,"I think we do. Why don’t we go inside? Look uh, I know why you’re here.",Ross,sadness,negative,74,3,8,3,"00:09:20,768","00:09:35,323" 743 | 786,You do?,Rachel,surprise,positive,74,4,8,3,"00:09:34,323","00:09:35,323" 744 | 787,"Yeah, and to save you from any embarrassment umm, I think maybe I should talk first.",Ross,neutral,neutral,74,5,8,3,"00:09:35,575","00:09:41,621" 745 | 788,Okay.,Rachel,neutral,neutral,74,6,8,3,"00:09:41,872","00:09:43,707" 746 | 789,"Okay. Uh, Ross and Rachel. Rachel and Ross. That’s been one heck of a see-saw hasn’t it?",Ross,neutral,neutral,74,7,8,3,"00:09:42,872","00:10:03,852" 747 | 790,What?,Rachel,surprise,negative,74,8,8,3,"00:10:04,645","00:10:05,895" 748 | 791,"I mean look, that-that one night we had was fun and…and certainly passionate, but don’t you think it’s better if we just stayed friends?",Ross,sadness,negative,74,9,8,3,"00:10:06,606","00:10:16,781" 749 | 792,Seriously. What?!,Rachel,surprise,negative,74,10,8,3,"00:10:18,909","00:10:20,827" 750 | 793,Okay.,Ross,neutral,neutral,74,11,8,3,"0:10:22,204","0:10:23,086" 751 | 794,Okay.,Ross,neutral,neutral,74,12,8,3,"0:10:23,086","0:10:24,058" 752 | 795,Y’know what?,Ross,neutral,neutral,74,13,8,3,"0:10:24,058","0:10:25,668" 753 | 796,"If you want to, we can do it one more time.",Ross,neutral,neutral,74,14,8,3,"00:10:25,791","00:10:29,711" 754 | 797,I mean I’d-I’d be okay with that.,Ross,neutral,neutral,74,15,8,3,"0:10:32,465","0:10:34,397" 755 | 798,"In fact, I have some time right now.",Ross,neutral,neutral,74,16,8,3,"0:10:34,397","0:10:38,140" 756 | 799,"Okay, y’know what? Can I, can I talk now?",Rachel,joy,positive,74,17,8,3,"0:10:38,604","0:10:40,648" 757 | 800,Oh sure.,Ross,neutral,neutral,74,18,8,3,"0:10:40,648","0:10:42,713" 758 | 801,"I’m pregnant. Ross? Ross? Okay, whenever you’re ready. And you’re the father by the way—but you got that",Rachel,anger,negative,74,19,8,3,"00:10:48,731","00:11:17,258" 759 | 802,We should defiantly play football more often. Maybe there’s a like league we could join or something.,Rachel,neutral,neutral,75,0,3,9,"00:21:44,886","00:21:52,935" 760 | 803,I know!,Chandler,joy,positive,76,0,3,1,"00:16:22,982","00:16:24,524" 761 | 804,"Yes! Wow, well, that-that was easy. Okay, you-you go.",Ross,surprise,positive,76,1,3,1,"00:16:25,693","00:16:30,655" 762 | 805,Okay.,Chandler,neutral,neutral,76,2,3,1,"0:16:30,823","0:16:31,575" 763 | 806,Okay.,Ross,neutral,neutral,76,3,3,1,"0:16:31,575","0:16:31,955" 764 | 807,"Okay, you know, you know when your in bed, with a woman.",Chandler,joy,positive,76,4,3,1,"00:16:32,491","00:16:35,451" 765 | 808,Hmph.,Ross,neutral,neutral,76,5,3,1,"00:16:35,619","00:16:36,703" 766 | 809,"And, ah, you know, your fooling around with her.",Chandler,joy,positive,76,6,3,1,"00:16:36,912","00:16:40,248" 767 | 810,"And you get all these like, mental images in your brain, you know, like Elle MacPherson, or that girl at the Xerox place....",Chandler,joy,positive,76,7,3,1,"00:16:40,416","00:16:46,671" 768 | 811,"With the belly-button ring? Oh, muhawa!",Ross,joy,positive,76,8,3,1,"00:16:46,839","00:16:49,549" 769 | 812,"I know, And then all of the sudden your Mom pops into your head.",Chandler,anger,negative,76,9,3,1,"00:16:49,717","00:16:52,301" 770 | 813,"And your like 'Mom, get outta here!'",Chandler,anger,negative,76,10,3,1,"00:16:54,054","00:16:57,724" 771 | 814,"You know, but of course, like, after that you can't possibly think of anything else, and you can't, you know, stop what your doing.",Chandler,anger,negative,76,11,3,1,"00:16:57,975","00:17:06,065" 772 | 815,"So it's kinda like, you're, you know.",Chandler,neutral,neutral,76,12,3,1,"00:17:00,769","00:17:08,860" 773 | 816,You know.... You don't know!,Chandler,surprise,negative,76,13,3,1,"00:17:06,442","00:17:11,029" 774 | 817,"Your Mom, your telling me, your telling me, about your Mom, what is the matter with you?",Ross,disgust,negative,76,14,3,1,"00:17:12,573","00:17:18,202" 775 | 818,You said...,Chandler,neutral,neutral,76,15,3,1,"0:17:19,079","0:17:20,831" 776 | 819,I said ',Ross,neutral,neutral,76,16,3,1,"0:17:20,831","0:17:22,173" 777 | 820,Oh!,Phoebe,surprise,positive,77,0,8,24,"00:17:17,065","00:17:18,066" 778 | 821,Look at Emma!,Ross,surprise,positive,77,1,8,24,"00:17:18,233","00:17:21,737" 779 | 822,"I just can’t decide who she looks more alike, you or Rachel?",Phoebe,neutral,neutral,77,2,8,24,"00:17:18,233","00:17:23,155" 780 | 823,"Oh what are you kidding? She’s gorgeous, it’s all Rachel.",Ross,joy,positive,77,3,8,24,"00:17:23,322","00:17:27,075" 781 | 824,"I’m sorry, for the last time, why aren’t you two together again?",Phoebe,neutral,neutral,77,4,8,24,"00:17:31,497","00:17:36,084" 782 | 825,"No, I know.",Phoebe,neutral,neutral,77,5,8,24,"0:17:37,544","0:17:38,170" 783 | 826,"I know, because you’re not in that place.",Phoebe,neutral,neutral,77,6,8,24,"0:17:38,170","0:17:40,780" 784 | 827,"Which would be fine, except you totally are.",Phoebe,neutral,neutral,77,7,8,24,"00:17:40,881","00:17:44,009" 785 | 828,It’s…it’s complicated okay?,Ross,sadness,negative,77,8,8,24,"00:17:44,176","00:17:47,513" 786 | 829,"Yeah that’s true. Yeah, you love her. You always have. You have a child together. There is no right answer.",Phoebe,neutral,neutral,77,9,8,24,"00:17:48,639","00:17:55,437" 787 | 830,"Look, we’ve been together.",Ross,sadness,negative,77,10,8,24,"0:17:57,272","0:17:58,454" 788 | 831,Okay?,Ross,neutral,neutral,77,11,8,24,"0:17:58,454","0:18:00,088" 789 | 832,"And then apart, and then together, and then apart, and now we have a baby.",Ross,sadness,negative,77,12,8,24,"00:18:00,192","00:18:04,738" 790 | 833,It’s just if-if we got together again and it didn’t work out…I could never do that to Emma.,Ross,sadness,negative,77,13,8,24,"00:18:07,658","00:18:16,624" 791 | 834,I mean she-she thinking everything— Oh that’s…now me.,Ross,sadness,negative,77,14,8,24,"00:18:18,043","00:18:23,507" 792 | 835,What do they put something in the water in this place?,Ross,neutral,neutral,77,15,8,24,"00:18:23,674","00:18:27,302" 793 | 836,"Since Rachel and I we’re doing really, we’re doing really well right now.",Ross,sadness,negative,77,16,8,24,"00:18:28,220","00:18:31,807" 794 | 837,"I know. I know. I know. I know, and if you try to make it more you might wreck it.",Phoebe,neutral,neutral,77,17,8,24,"00:18:31,974","00:18:36,019" 795 | 838,"Yeah, exactly.",Ross,neutral,neutral,77,18,8,24,"00:18:36,186","00:18:38,397" 796 | 839,Right. Or you might get everything you’ve wanted since you were fifteen.,Phoebe,neutral,neutral,77,19,8,24,"00:18:40,899","00:18:44,778" 797 | 840,God. I forgot how much I love driving. I have,Rachel,joy,positive,78,0,7,22,"00:09:32,530","00:09:35,490" 798 | 841,You don’t have a,Ross,neutral,neutral,78,1,7,22,"00:09:41,414","00:09:45,375" 799 | 842,"Oh Ross you’re so tense! You just gotta relax, okay? Just need to relax all right? Just need to relax",Rachel,neutral,neutral,78,2,7,22,"00:09:45,585","00:09:53,925" 800 | 843,What-what are you doing?! Are you—Okay that’s not funny! Just stop horsing around!,Ross,anger,negative,78,3,7,22,"00:09:54,093","00:09:57,917" 801 | 844,"I am not horsing around, okay? I am Porsching around.",Rachel,joy,positive,78,4,7,22,"00:09:58,139","00:10:00,390" 802 | 845,Uh-oh.,Rachel,fear,negative,78,5,7,22,"00:10:08,733","00:10:10,775" 803 | 846,"Okay, stay calm. Nothing is going to happen to you, you are not in that much trouble.",Ross,neutral,neutral,78,6,7,22,"00:10:10,943","00:10:16,072" 804 | 847,Really? You think so?,Rachel,fear,negative,78,7,7,22,"00:10:16,240","00:10:17,657" 805 | 848,I was talking to myself! You’re going down!,Ross,anger,negative,78,8,7,22,"00:10:17,825","00:10:20,619" 806 | 849,Hey honey! I missed you today!,Monica,joy,positive,79,0,9,21,"00:05:26,159","00:05:28,535" 807 | 850,"Oh, yeah?",Chandler,surprise,positive,79,1,9,21,"00:05:28,703","00:05:31,204" 808 | 851,Yeah. What d'you wanna do tonight?,Monica,neutral,neutral,79,2,9,21,"0:05:31,956","0:05:33,168" 809 | 852,"Oh, well... Maybe we could...",Chandler,neutral,neutral,79,3,9,21,"0:05:33,168","0:05:36,842" 810 | 853,"Ok, trying to turn me on by making a mess?",Monica,joy,positive,79,4,9,21,"00:05:46,429","00:05:49,931" 811 | 854,Know your audience!,Monica,joy,positive,79,5,9,21,"00:05:50,099","00:05:51,683" 812 | 855,"Besides, tomorrow we're doing those fertility tests and until then you need to keep your tadpoles in the tank.",Monica,neutral,neutral,79,6,9,21,"00:05:53,353","00:05:59,816" 813 | 856,We really need to take those tests?,Chandler,sadness,negative,79,7,9,21,"00:06:01,277","00:06:03,403" 814 | 857,"Honey, we've been trying to have a baby for over a year.",Monica,neutral,neutral,79,8,9,21,"00:06:03,571","00:06:05,655" 815 | 858,I think it's a good idea to find out if everything's ok. Just a few routine tests.,Monica,neutral,neutral,79,9,9,21,"00:06:05,823","00:06:12,954" 816 | 859,But I don't wanna do it in a cup!,Chandler,sadness,negative,79,10,9,21,"00:06:08,910","00:06:12,954" 817 | 860,"Oh, hi Max! Hey, do you know everybody?",Phoebe,neutral,neutral,80,0,1,10,"00:12:02,471","00:12:04,639" 818 | 861,No. Have you seen David?,Max,neutral,neutral,80,1,1,10,"00:12:04,807","00:12:06,683" 819 | 862,"No, no, he hasn't been around.",Phoebe,neutral,neutral,80,2,1,10,"00:12:08,227","00:12:09,519" 820 | 863,"Well, if you see him, tell him to pack his bags. We are going to Minsk.",Max,neutral,neutral,80,3,1,10,"00:12:09,687","00:12:13,273" 821 | 864,Minsk?,Phoebe,surprise,negative,80,4,1,10,"0:12:13,941","0:12:14,533" 822 | 865,Minsk. It's in Russia.,Max,neutral,neutral,80,5,1,10,"0:12:14,533","0:12:16,673" 823 | 866,I know where Minsk is.,Phoebe,neutral,neutral,80,6,1,10,"00:12:17,737","00:12:19,696" 824 | 867,"We got the grant. Three years, all expenses paid.",Max,joy,positive,80,7,1,10,"00:12:20,406","00:12:25,535" 825 | 868,"So when, when do you leave?",Phoebe,neutral,neutral,80,8,1,10,"00:12:26,078","00:12:27,328" 826 | 869,January first,Max,neutral,neutral,80,9,1,10,"00:12:27,538","00:12:29,205" 827 | 870,You wanted to see me Professor Geller?,Elizabeth,joy,positive,81,0,6,19,"0:09:51,882","0:09:53,444" 828 | 871,"Yes. Yes! Please, come in.",Ross,neutral,neutral,81,1,6,19,"0:09:53,444","0:09:56,235" 829 | 873,Oo-oo!,Ross,joy,positive,81,2,6,19,"00:09:59,807","00:10:01,016" 830 | 874,Pretty great! Except I did get a little attitude from the robot.,Joey,joy,positive,82,0,6,21,"00:09:50,006","00:09:53,633" 831 | 875,"Damn those robots, they’re supposed to be our",Chandler,anger,negative,82,1,6,21,"00:09:53,801","00:09:57,137" 832 | 876,"Anyway, it wasn’t the robot, it was the guy who controls him.",Joey,neutral,neutral,82,2,6,21,"00:09:58,222","00:10:00,724" 833 | 877,"Yeah, he doesn’t like me.",Joey,anger,negative,82,3,6,21,"0:10:00,891","0:10:04,063" 834 | 878,He had C.H.E.E.S.E.,Joey,neutral,neutral,82,4,6,21,"0:10:04,063","0:10:04,284" 835 | 879,knock over the sandwich right when I was reaching for one!,Joey,anger,negative,82,5,6,21,"00:10:02,227","00:10:06,771" 836 | 880,Ohh!,Joey,surprise,positive,82,6,6,21,"00:10:05,771","00:10:06,771" 837 | 881,"Well, why don’t you just get him fired?",Phoebe,neutral,neutral,82,7,6,21,"00:10:06,939","00:10:08,607" 838 | 882,"I may have to, I hate to do it, but I’m the star!",Joey,anger,negative,82,8,6,21,"0:10:08,774","0:10:11,706" 839 | 883,Y’know?,Joey,neutral,neutral,82,9,6,21,"0:10:11,706","0:10:12,508" 840 | 884,There’s a limit to how many sandwiches I can eat off the floor.,Joey,neutral,neutral,82,10,6,21,"00:10:12,612","00:10:15,905" 841 | 885,Excuse me.,Joey,neutral,neutral,82,11,6,21,"00:10:17,825","00:10:20,118" 842 | 886,Joey Tribbiani.,Joey,neutral,neutral,82,12,6,21,"00:10:20,286","00:10:22,579" 843 | 887,"Joe! I’m glad I found ya, I got an audition for ya!",Estelle,joy,positive,82,13,6,21,"00:10:22,747","00:10:26,458" 844 | 888,Wow!,Joey,surprise,positive,82,14,6,21,"0:10:26,626","0:10:27,338" 845 | 889,The thing is it’s kinda on the Q.T.,Estelle,neutral,neutral,82,15,6,21,"0:10:27,338","0:10:29,678" 846 | 890,The actor who has the part doesn’t know he might be fired.,Estelle,neutral,neutral,82,16,6,21,"00:10:29,795","00:10:33,715" 847 | 891,"It’s the lead in a series, Mac and C.H.E.E.S.E.",Estelle,neutral,neutral,82,17,6,21,"00:10:33,833","00:10:37,761" 848 | 892,I’m the lead in Mac and C.H.E.E.S.E.!!,Joey,anger,negative,82,18,6,21,"00:10:39,597","00:10:41,348" 849 | 893,Oh good God! If you want a baby so bad just go steal it!,Monica,anger,negative,83,0,8,23,"00:10:26,614","00:10:30,117" 850 | 894,What is going on with you? Since when are you so crazy about babies?,Monica,surprise,positive,83,1,8,23,"00:10:33,287","00:10:36,582" 851 | 895,I’m not crazy about babies. I’m crazy about us.,Chandler,joy,positive,83,2,8,23,"00:10:36,791","00:10:41,128" 852 | 896,What?,Monica,surprise,positive,83,3,8,23,"00:10:42,838","00:10:43,881" 853 | 897,"Look, we’ve always talked about having babies someday.",Chandler,neutral,neutral,83,4,8,23,"00:10:44,131","00:10:47,885" 854 | 898,"I’m not saying it has to be right now, but I’m starting to think that we can handle it.",Chandler,neutral,neutral,83,5,8,23,"00:10:48,094","00:10:53,307" 855 | 899,We’re good.,Chandler,neutral,neutral,83,6,8,23,"00:10:52,307","00:10:53,307" 856 | 900,We’re really good.,Chandler,joy,positive,83,7,8,23,"00:10:53,474","00:10:56,143" 857 | 901,"Oh, did you catch him?!",Monica,surprise,negative,84,0,5,13,"00:09:39,036","00:09:41,288" 858 | 903,Wh-what did he say?!,Ross,surprise,negative,84,1,5,13,"00:09:39,036","00:09:41,288" 859 | 904,"He said, ""Nice to meet you Glenda."" Well, obviously I couldn't give him my real name?",Phoebe,neutral,neutral,84,2,5,13,"00:09:41,539","00:09:48,128" 860 | 905,Why?! Why not?!,Rachel,surprise,negative,84,3,5,13,"00:09:48,379","00:09:49,462" 861 | 906,"Come on, you saw the way he ran out of here!",Phoebe,sadness,negative,84,4,5,13,"00:09:49,714","00:09:51,172" 862 | 908,He's gonna stick around and talk to the daughter he abandoned!,Phoebe,sadness,negative,84,5,5,13,"00:09:51,382","00:09:54,175" 863 | 909,What did you say to him?,Joey,neutral,neutral,84,6,5,13,"00:09:54,427","00:09:56,136" 864 | 910,"Well, I said, I told him y'know, that I was the executor person of Francis' will and that I needed to talk to him so I'm gonna meet him at the coffee house later.",Phoebe,neutral,neutral,84,7,5,13,"00:09:56,387","00:10:03,685" 865 | 911,"Oh yeah, sure.",Rachel,neutral,neutral,85,0,8,4,"00:18:12,424","00:18:14,258" 866 | 912,"Okay, in about ten seconds you’re gonna see him kiss me.",Rachel,joy,positive,85,1,8,4,"00:18:14,468","00:18:17,053" 867 | 913,And in about five seconds you’re gonna see why.,Ross,neutral,neutral,85,2,8,4,"00:18:17,221","00:18:21,349" 868 | 914,Ross did I ever tell you about the time that I went backpacking through Western Europe?,Rachel,neutral,neutral,85,3,8,4,"00:18:24,561","00:18:30,525" 869 | 915,"Okay, get ready to see some beggin’!",Rachel,joy,positive,85,4,8,4,"00:18:37,407","00:18:40,409" 870 | 916,"Oh, you came on to Ross!",Phoebe,surprise,positive,85,5,8,4,"00:18:41,078","00:18:43,579" 871 | 917,What?!,Rachel,surprise,negative,85,6,8,4,"0:18:44,456","0:18:46,542" 872 | 918,Now I’m so happy.,Ross,joy,positive,85,7,8,4,"0:18:46,542","0:18:47,724" 873 | 919,What are you talking about?!,Rachel,surprise,negative,85,8,8,4,"0:18:48,585","0:18:50,227" 874 | 920,You used the Europe story!,Monica,joy,positive,85,9,8,4,"0:18:50,227","0:18:52,106" 875 | 921,That’s the magic story you use when you wanna have sex!,Chandler,anger,negative,85,10,8,4,"00:18:52,214","00:18:55,675" 876 | 922,How do you know about that story?!,Rachel,surprise,negative,85,11,8,4,"0:18:57,803","0:19:02,115" 877 | 923,How do,Joey,neutral,neutral,85,12,8,4,"0:19:02,115","0:19:03,245" 878 | 924,I heard it from my friend Irene who heard it from some guy!,Rachel,neutral,neutral,85,13,8,4,"00:19:03,433","00:19:06,811" 879 | 925,Some guy!!,Joey,surprise,positive,85,14,8,4,"00:19:07,437","00:19:09,689" 880 | 926,"No. No, she told me his name was Ken Adams.",Rachel,neutral,neutral,85,15,8,4,"00:19:12,484","00:19:15,153" 881 | 927,Ken Adams!!,Joey,surprise,positive,85,16,8,4,"00:19:18,115","00:19:19,532" 882 | 928,"How we doing, you guys ready?",Ross,neutral,neutral,86,0,1,8,"00:13:16,003","00:13:17,545" 883 | 929,Mom already called this morning to remind me not to wear my hair up. Did you know my ears are not my best feature?,Monica,neutral,neutral,86,1,1,8,"00:13:17,797","00:13:23,134" 884 | 930,Some days it's all I can think about.,Ross,neutral,neutral,86,2,1,8,"00:13:23,385","00:13:25,637" 885 | 931,"Hi, sorry I'm late, I couldn't find my bearings.",Phoebe,neutral,neutral,86,3,1,8,"00:13:26,514","00:13:29,516" 886 | 932,"Oh... ok, fine.",Ross,neutral,neutral,87,0,9,20,"0:08:48,975","0:08:49,643" 887 | 933,But... ehm...,Ross,neutral,neutral,87,1,9,20,"0:08:49,643","0:08:50,985" 888 | 934,"I just have one question for you, ehm...",Ross,neutral,neutral,87,2,9,20,"0:08:50,985","0:08:52,844" 889 | 935,"When we exit should we walk, or run, or prance, or stroll...",Ross,neutral,neutral,87,3,9,20,"00:08:52,937","00:08:58,567" 890 | 936,"Stop it, stop it! He talks slow but he might pee fast! Ok, let's go!!",Charlie,joy,positive,87,4,9,20,"00:08:58,734","00:09:03,572" 891 | 937,I can’t believe this! How long as this been going on?,Phoebe,surprise,negative,88,0,8,14,"00:01:10,560","00:01:12,960" 892 | 938,"Well umm, Alexandra has been",Monica,neutral,neutral,88,1,8,14,"0:01:13,360","0:01:15,920" 893 | 939,"Oh, it has a name?",Phoebe,surprise,negative,88,2,8,14,"0:01:15,920","0:01:16,825" 894 | 940,"Phoebe, don’t get upset!",Monica,sadness,negative,88,3,8,14,"00:01:18,320","00:01:19,960" 895 | 941,Okay—Oop! Too late! I’m leaving! Come on Chandler let’s go!,Phoebe,anger,negative,88,4,8,14,"00:01:20,200","00:01:25,240" 896 | 942,"Well, Phoebe I thought I’d——Yeah, what the hell.",Chandler,neutral,neutral,88,5,8,14,"00:01:26,360","00:01:30,160" 897 | 943,Ben!,Joey,fear,negative,89,0,2,6,"00:12:04,348","00:12:05,348" 898 | 944,"Oh, that's good. Maybe he'll hear you and pull the cord.",Chandler,anger,negative,89,1,2,6,"00:12:06,767","00:12:10,562" 899 | 945,Stop the bus! Wait! Wait! Wait!,Joey,fear,negative,89,2,2,6,"00:12:10,730","00:12:15,525" 900 | 946,Are you sure he didn't break it because it really hurts?,Monica,neutral,neutral,89,3,2,6,"00:12:20,990","00:12:23,408" 901 | 947,"No, it's just a good bone bruise. And, right here is the puncture wound from your ring.",Doctor,neutral,neutral,89,4,2,6,"00:12:23,576","00:12:30,749" 902 | 948,"Oh, I'm sorry, I'm really sorry.",Ross,sadness,negative,89,5,2,6,"0:12:32,293","0:12:34,685" 903 | 949,Sorry.,Ross,sadness,negative,89,6,2,6,"0:12:34,685","0:12:35,144" 904 | 950,Sorry!,Ross,sadness,negative,89,7,2,6,"0:12:35,144","0:12:35,290" 905 | 953,I got my s's back!,Ross,joy,positive,89,8,2,6,"00:12:36,839","00:12:40,467" 906 | 954,Which we can celebrate later.,Ross,neutral,neutral,89,9,2,6,"00:12:41,177","00:12:43,803" 907 | 955,Celebrate.,Ross,neutral,neutral,89,10,2,6,"00:12:44,430","00:12:46,514" 908 | 956,"Ok, Paulo, why don't you just go get dressed, and then you be on your way, ok, bye-bye.",Rachel,joy,positive,90,0,2,1,"00:11:02,536","00:11:08,208" 909 | 957,"Rachel, how did this happen?",Monica,neutral,neutral,90,1,2,1,"00:11:09,418","00:11:11,044" 910 | 958,"I don't know, I just kinda ran into him last night.",Rachel,fear,negative,90,2,2,1,"00:11:11,212","00:11:13,546" 911 | 959,Where?,Phoebe,neutral,neutral,90,3,2,1,"00:11:13,714","00:11:15,090" 912 | 960,At his apartment. Is this juice?,Rachel,neutral,neutral,90,4,2,1,"00:11:13,714","00:11:16,800" 913 | 961,"Whoa, whoa. And the fact that you dumped him because he hit on Phoebe?",Joey,anger,negative,90,5,2,1,"00:11:17,426","00:11:21,179" 914 | 962,"Oh God, I know I'm a pathetic loser.",Rachel,sadness,negative,90,6,2,1,"00:11:21,347","00:11:24,474" 915 | 963,"I licked my arm, what?",Phoebe,surprise,positive,91,0,2,2,"00:09:10,633","00:09:12,425" 916 | 964,It's breast milk.,Ross,neutral,neutral,91,1,2,2,"00:09:12,593","00:09:14,928" 917 | 965,So?,Phoebe,neutral,neutral,91,2,2,2,"00:09:15,096","00:09:16,346" 918 | 966,"Phoebe, that is juice, squeezed from a person.",Rachel,neutral,neutral,91,3,2,2,"00:09:16,514","00:09:20,600" 919 | 967,What is the big deal?,Joey,anger,negative,91,4,2,2,"00:09:21,435","00:09:24,229" 920 | 968,What did you just do?,Chandler,surprise,negative,91,5,2,2,"00:09:25,815","00:09:27,440" 921 | 969,"Ok, would people stop drinking the breast milk?",Ross,disgust,negative,91,6,2,2,"00:09:29,485","00:09:32,904" 922 | 970,You won't even taste it?,Phoebe,neutral,neutral,91,7,2,2,"0:09:34,407","0:09:36,329" 923 | 971,No!,Ross,disgust,negative,91,8,2,2,"0:09:36,329","0:09:37,373" 924 | 972,Not even if you just pretend that it's milk?,Phoebe,neutral,neutral,91,9,2,2,"00:09:37,493","00:09:39,703" 925 | 973,Not even if Carol's breast had a picture of a missing child on it.,Ross,disgust,negative,91,10,2,2,"00:09:39,870","00:09:43,206" 926 | 974,Aww!,All,surprise,positive,92,0,6,11,"00:12:03,764","00:12:05,181" 927 | 976,"Hey Pheebs, could you please not put your feet up on my new……old sheet?",Ross,disgust,negative,92,1,6,11,"00:12:11,564","00:12:16,735" 928 | 977,Oh sure! Noo!,Phoebe,joy,positive,92,2,6,11,"00:12:17,278","00:12:18,778" 929 | 978,Ohh!!,Rachel,surprise,negative,92,3,6,11,"00:12:18,946","00:12:19,988" 930 | 979,My apothecary table!!!,Ross,surprise,negative,92,4,6,11,"00:12:20,156","00:12:21,958" 931 | 980,What?!,Phoebe,surprise,negative,92,5,6,11,"0:12:22,658","0:12:23,326" 932 | 982,Noooooo!!,Rachel,fear,negative,92,6,6,11,"0:12:23,326","0:12:24,798" 933 | 983,"Ross, where did you get this?!",Phoebe,surprise,negative,92,7,6,11,"00:12:25,619","00:12:28,747" 934 | 985,"Oh my God, Phoebe,",Rachel,anger,negative,92,8,6,11,"00:12:31,375","00:12:33,251" 935 | 986,"Wow! Oh my God, well if they’ve ripped off our table ours must be much more than one and fifty dollars!",Phoebe,anger,negative,92,9,6,11,"00:12:39,175","00:12:45,513" 936 | 988,Well this doesn’t even smell like opium.,Phoebe,disgust,negative,92,10,6,11,"00:12:47,641","00:12:50,018" 937 | 989,"Of course not, it smells like wine, which you spilled! And thanks for wrecking my sheet by the way.",Ross,anger,negative,92,11,6,11,"00:12:50,186","00:12:55,356" 938 | 990,How is she?,Rachel,sadness,negative,93,0,2,1,"00:15:03,402","00:15:05,028" 939 | 991,"It's too soon to tell. She's resting, which is a good sign.",Phoebe,neutral,neutral,93,1,2,1,"00:15:05,696","00:15:11,367" 940 | 992,How's the hair?,Ross,neutral,neutral,93,2,2,1,"00:15:12,703","00:15:15,288" 941 | 993,"I'm not gonna lie to you, Ross, it doesn't look good.",Phoebe,sadness,negative,93,3,2,1,"00:15:12,703","00:15:17,206" 942 | 994,"I put a clip on one side, which seems to have stopped the curling.",Phoebe,neutral,neutral,93,4,2,1,"00:15:19,084","00:15:22,295" 943 | 995,Can we see her?,Joey,neutral,neutral,93,5,2,1,"00:15:24,173","00:15:25,298" 944 | 996,"Your hair looks too good, I think it would upset her. Ross, why don't you come on in.",Phoebe,sadness,negative,93,6,2,1,"00:15:25,883","00:15:31,387" 945 | 998,How're you doing?,Joey,sadness,negative,93,7,2,1,"00:15:38,479","00:15:40,980" 946 | 999,Of course the packaging does appeal to grown-ups and kids alike.,Chandler,neutral,neutral,94,0,2,2,"00:13:10,331","00:13:13,708" 947 | 1000,"Ross, you're being silly. I've tried it, it's no big deal. Just taste it.",Carol,joy,positive,94,1,2,2,"00:13:15,920","00:13:21,549" 948 | 1001,That would be no.,Ross,disgust,negative,94,2,2,2,"00:13:21,717","00:13:23,551" 949 | 1002,Come on. It doesn't taste bad.,Phoebe,neutral,neutral,94,3,2,2,"00:13:24,345","00:13:28,306" 950 | 1003,"Yeah, it's kinda sweet, sorta like, uh...",Joey,neutral,neutral,94,4,2,2,"00:13:28,474","00:13:31,392" 951 | 1004,Cantaloupe juice.,Susan,joy,positive,94,5,2,2,"00:13:31,560","00:13:33,686" 952 | 1005,Exactly.,Joey,neutral,neutral,94,6,2,2,"00:13:33,854","00:13:35,396" 953 | 1006,You've tasted it? You've tasted it.,Ross,surprise,positive,94,7,2,2,"00:13:42,404","00:13:46,199" 954 | 1007,Uh huh.,Susan,neutral,neutral,94,8,2,2,"00:13:46,367","00:13:47,659" 955 | 1008,"Oh, you've tasted it.",Ross,anger,negative,94,9,2,2,"00:13:48,410","00:13:50,245" 956 | 1009,"You can keep saying it, but it won't stop being true.",Susan,neutral,neutral,94,10,2,2,"00:13:52,414","00:13:55,375" 957 | 1010,Gimme the bottle. Gimme the towel.,Ross,anger,negative,94,11,2,2,"00:14:03,217","00:14:04,634" 958 | 1011,I still don't get why Greg and Jenny would give us a fake number.,Monica,anger,negative,95,0,8,4,"00:12:36,922","00:12:39,966" 959 | 1012,"Y’know, if they knew what they were doing they probably didn’t give you real names either.",Joey,neutral,neutral,95,1,8,4,"00:12:40,134","00:12:46,181" 960 | 1013,"Okay, maybe people give out fake numbers, but they don’t give out fake names.",Monica,anger,negative,95,2,8,4,"00:12:46,390","00:12:50,226" 961 | 1014,"Oh yeah? Hi, Ken Adams, nice to meet you.",Joey,neutral,neutral,95,3,8,4,"00:12:50,394","00:12:54,147" 962 | 1015,Regina Philange.,Phoebe,neutral,neutral,95,4,8,4,"00:12:56,400","00:12:59,068" 963 | 1016,"I still don’t get it, we didn’t do anything wrong.",Chandler,surprise,negative,95,5,8,4,"00:12:59,862","00:13:02,530" 964 | 1017,"I know! Although, you did tell an awful lot of jokes.",Monica,anger,negative,95,6,8,4,"00:13:04,492","00:13:08,036" 965 | 1018,I thought you said those jokes were funny. Joke! Joke! Joke!,Chandler,surprise,positive,95,7,8,4,"00:13:08,871","00:13:12,707" 966 | 1019,Joke. Joke. Blah! Blah!,Monica,anger,negative,95,8,8,4,"00:13:12,875","00:13:15,627" 967 | 1020,Well maybe it was all of your questions.,Chandler,neutral,neutral,95,9,8,4,"0:13:20,508","0:13:22,490" 968 | 1021,What about my questions?,Monica,neutral,neutral,95,10,8,4,"0:13:22,490","0:13:23,602" 969 | 1022,"No, I’m sorry. It’s just my foot itches like crazy.",Cliff,neutral,neutral,96,0,8,24,"00:04:00,603","00:04:03,523" 970 | 1023,"Oh, I’ll get it.",Phoebe,neutral,neutral,96,1,8,24,"00:04:03,690","00:04:06,150" 971 | 1024,Wow! I usually get to know a girl a little better before I let her spoon me.,Cliff,surprise,negative,96,2,8,24,"00:04:07,735","00:04:11,572" 972 | 1025,"Relax, it’s not like we’re forking.",Phoebe,joy,positive,96,3,8,24,"00:04:12,907","00:04:15,493" 973 | 1026,"Look at it! Ohhh! Wallpaper’s a little faded, that’s okay. Carpet’s a little loose. Hardwood floors!!",Monica,joy,positive,97,0,3,20,"00:03:55,109","00:04:03,992" 974 | 1027,Hey!,Phoebe,joy,positive,97,1,3,20,"0:04:06,204","0:04:06,706" 975 | 1028,Hello.,Chandler,neutral,neutral,97,2,3,20,"0:04:06,706","0:04:08,722" 976 | 1029,Oh! Ooh! Oh Monica! It’s so beautiful.,Phoebe,joy,positive,97,3,3,20,"00:04:08,831","00:04:13,835" 977 | 1030,I know!!!,Monica,joy,positive,97,4,3,20,"00:04:11,835","00:04:13,835" 978 | 1031,"So, I’m here, ready to play.",Phoebe,joy,positive,97,5,3,20,"0:04:14,963","0:04:16,675" 979 | 1032,Okay.,Monica,neutral,neutral,97,6,3,20,"0:04:16,675","0:04:17,695" 980 | 1033,"I brought a bunch of stuff for the house, so check it out. Ha-ha.",Phoebe,joy,positive,97,7,3,20,"00:04:17,799","00:04:22,261" 981 | 1034,What’s this?,Monica,surprise,positive,97,8,3,20,"00:04:25,974","00:04:27,057" 982 | 1035,"That’s a dog, every house should have a dog.",Phoebe,joy,positive,97,9,3,20,"00:04:27,225","00:04:29,559" 983 | 1036,Not one that can pee on the roof.,Monica,surprise,negative,97,10,3,20,"00:04:30,144","00:04:32,020" 984 | 1037,"Well, maybe it’s so big because the house was built on radioactive waste.",Phoebe,joy,positive,97,11,3,20,"00:04:33,481","00:04:39,403" 985 | 1038,And is this in case the house sneezes?,Chandler,surprise,negative,97,12,3,20,"00:04:41,447","00:04:45,033" 986 | 1039,"No, no, that’s the ghost for the attic.",Phoebe,neutral,neutral,97,13,3,20,"00:04:46,619","00:04:50,122" 987 | 1040,I don’t want a ghost.,Monica,fear,negative,97,14,3,20,"00:04:51,249","00:04:55,043" 988 | 1041,"Well, nobody wants a ghost. But you’ve got one, because the house is sitting on an ancient Indian burial ground.",Phoebe,neutral,neutral,97,15,3,20,"00:04:56,462","00:05:02,342" 989 | 1042,"Wait a minute, the house was built on radioactive waste, and an ancient Indian burial ground? That would never happen.",Ross,surprise,positive,97,16,3,20,"00:05:04,053","00:05:12,394" 990 | 1043,"Okay, obviously you don’t know much about the U.S. government.",Phoebe,neutral,neutral,97,17,3,20,"00:05:14,063","00:05:17,899" 991 | 1044,Hey!,Rachel,surprise,positive,97,18,3,20,"0:05:19,068","0:05:20,960" 992 | 1045,Hello.,All,neutral,neutral,97,19,3,20,"0:05:20,960","0:05:21,458" 993 | 1046,I need to talk to you!,Rachel,joy,positive,97,20,3,20,"0:05:21,571","0:05:23,115" 994 | 1047,"Sure, what’s up?",Ross,neutral,neutral,97,21,3,20,"0:05:23,115","0:05:24,625" 995 | 1048,"All right, I just got changed in thirty seconds so you can be alone with him. You'd better go for it.",Jeannine,anger,negative,98,0,3,12,"00:05:20,528","00:05:28,076" 996 | 1049,"Please, I'm not going for anything.",Monica,disgust,negative,98,1,3,12,"00:05:24,449","00:05:28,076" 997 | 1050,"Well, if you don't, I will.",Jeannine,anger,negative,98,2,3,12,"0:05:28,244","0:05:29,955" 998 | 1051,Would you please go?,Monica,joy,positive,98,3,3,12,"0:05:29,955","0:05:31,517" 999 | 1052,I would!,Ross,anger,negative,98,4,3,12,"0:05:31,517","0:05:31,727" 1000 | 1053,"Hey, guys, guys, did you see my new, china cabinet?!",Monica,joy,positive,99,0,3,20,"00:09:00,831","00:09:04,876" 1001 | 1054,Uh-huh.,Ross and Rachel,neutral,neutral,99,1,3,20,"00:09:05,294","00:09:06,336" 1002 | 1055,"Watch, watch.",Phoebe,joy,positive,99,2,3,20,"00:09:08,256","00:09:09,297" 1003 | 1057,Ooohhhh!!,Ross and Rachel,surprise,positive,99,3,3,20,"0:09:10,633","0:09:10,717" 1004 | 1059,"And, and!",Phoebe,joy,positive,99,4,3,20,"0:09:10,717","0:09:12,855" 1005 | 1060,Ahhhh!!,Ross and Rachel,surprise,positive,99,5,3,20,"00:09:12,969","00:09:15,345" 1006 | 1061,"Hey, my Father’s house does that!",Chandler,surprise,positive,99,6,3,20,"00:09:17,223","00:09:19,933" 1007 | 1062,"O-o-o-okay, how did it go? Tell me everything.",Rachel,neutral,neutral,99,7,3,20,"00:09:21,143","00:09:23,937" 1008 | 1063,"Well, the movie was great, dinner was great, and there’s nothing like a cool, crisp New York evening.",Chandler,neutral,neutral,99,8,3,20,"00:09:24,105","00:09:30,277" 1009 | 1064,Okay. It’s Emma.,Monica,neutral,neutral,100,0,1,1,"00:13:23,916","00:13:26,460" 1010 | 1065,Emma! See? I don’t want it.,Rachel,sadness,negative,101,0,8,4,"00:13:27,795","00:13:35,928" 1011 | 1066,Take it.,Monica,neutral,neutral,102,0,1,2,"0:13:40,766","0:13:42,477" 1012 | 1067,What?,Rachel,neutral,neutral,102,1,1,2,"0:13:42,477","0:13:43,955" 1013 | 1068,It’s clearly an Emma.,Monica,neutral,neutral,103,0,8,24,"00:13:44,395","00:13:46,438" 1014 | 1069,"Oh honey, but you love that name.",Rachel,sadness,negative,103,1,8,24,"00:13:46,605","00:13:48,816" 1015 | 1070,"Yeah, but I love you more.",Monica,joy,positive,103,2,8,24,"00:13:49,817","00:13:51,986" 1016 | 1071,"Besides y’know, nothing goes with Bing.",Monica,neutral,neutral,103,3,8,24,"0:13:55,072","0:13:57,909" 1017 | 1072,So I’m screwed.,Monica,joy,positive,103,4,8,24,"0:13:57,909","0:13:59,473" 1018 | 1081,"Oh-oh, I'm a duck! I go, ""Quack, quack!"" I’m happy all the time!",Chandler,joy,positive,104,0,5,8,"00:20:15,464","00:20:18,925" 1019 | 1082,Nice try.,Chandler,sadness,negative,104,1,5,8,"00:20:30,395","00:20:31,520" 1020 | 1083,"Wait, wait, wait!",Monica,joy,positive,104,2,5,8,"00:20:31,688","00:20:33,522" 1021 | 1084,"Look, Monica",Chandler,neutral,neutral,104,3,5,8,"0:20:36,526","0:20:37,361" 1022 | 1085,Look!,Monica,surprise,negative,104,4,5,8,"0:20:37,361","0:20:37,799" 1023 | 1086,This is not going to work.,Chandler,anger,negative,104,5,5,8,"00:20:42,366","00:20:43,699" 1024 | 1087,I bet this will work!,Monica,joy,positive,104,6,5,8,"00:20:43,867","00:20:45,660" 1025 | 1088,You are so great! I love you!,Chandler,joy,positive,104,7,5,8,"00:20:54,086","00:20:56,754" 1026 | 1089,What?,Monica,surprise,positive,104,8,5,8,"00:21:06,431","00:21:07,765" 1027 | 1090,"Nothing! I said, I said ""You're so great"" and then I just, I just stopped talking!",Chandler,fear,negative,104,9,5,8,"00:21:07,933","00:21:11,852" 1028 | 1091,You said you loved me! I can't believe this!,Monica,surprise,positive,104,10,5,8,"00:21:13,563","00:21:15,815" 1029 | 1092,No I didn't!,Chandler,fear,negative,104,11,5,8,"00:21:15,983","00:21:17,108" 1030 | 1093,"Yes, you did!",Monica,surprise,positive,104,12,5,8,"0:21:18,944","0:21:21,072" 1031 | 1094,No I didn't!,Chandler,fear,negative,104,13,5,8,"0:21:21,072","0:21:21,468" 1032 | 1095,You love me!,Monica,joy,positive,104,14,5,8,"00:21:22,281","00:21:23,823" 1033 | 1096,No I don't! Stop it! Stop it! Stop it! Stop it!,Chandler,anger,negative,104,15,5,8,"00:21:24,032","00:21:26,993" 1034 | 1097,Hello Greg?,Monica,neutral,neutral,105,0,8,4,"0:21:37,296","0:21:40,258" 1035 | 1098,"Hi, this is Monica from the plane?",Monica,neutral,neutral,105,1,8,4,"0:21:40,258","0:21:40,443" 1036 | 1099,"Listen, the number that you gave me 853-5… That is their old number!",Monica,anger,negative,105,2,8,4,"00:21:40,590","00:21:47,722" 1037 | 1100,Jenny’s been giving it out since they moved!,Monica,anger,negative,105,3,8,4,"00:21:44,678","00:21:47,722" 1038 | 1101,Jenny! That is so Jenny!,Chandler,joy,positive,105,4,8,4,"00:21:47,889","00:21:51,851" 1039 | 1102,"Hey listen umm, how would you like to get together?",Monica,neutral,neutral,105,5,8,4,"00:21:52,019","00:21:55,938" 1040 | 1103,Say next Saturday?,Monica,neutral,neutral,105,6,8,4,"00:21:54,000","00:21:55,938" 1041 | 1104,"Okay, how about Sunday?",Monica,neutral,neutral,105,7,8,4,"00:21:56,106","00:21:58,316" 1042 | 1105,"Okay umm, the week after that?",Monica,joy,positive,105,8,8,4,"0:21:58,483","0:21:59,568" 1043 | 1106,The week after that?,Monica,joy,positive,105,9,8,4,"0:21:59,568","0:22:01,261" 1044 | 1107,Y’know what Greg?,Monica,anger,negative,105,10,8,4,"00:22:03,488","00:22:04,947" 1045 | 1109,"We are good, interesting, funny people with",Monica,anger,negative,105,11,8,4,"00:22:05,115","00:22:09,410" 1046 | 1110,Hey Chandler! Y’know that girl you went to college with who-who became a movie director?,Joey,neutral,neutral,106,0,6,18,"00:01:59,994","00:02:03,997" 1047 | 1111,"Oh yeah, Dana Keystone. She was in my Movement class.",Chandler,neutral,neutral,106,1,6,18,"00:02:04,165","00:02:07,543" 1048 | 1112,What’s a Movement class?,Phoebe,neutral,neutral,106,2,6,18,"00:02:08,169","00:02:09,795" 1049 | 1113,It’s Chandler’s way of pretending he didn’t take mime.,Monica,neutral,neutral,106,3,6,18,"00:02:09,963","00:02:13,340" 1050 | 1114,"Oh well listen, anyway she’s directing the new Al Pacino movie. You gotta get me an audition!",Joey,joy,positive,106,4,6,18,"00:02:13,883","00:02:21,306" 1051 | 1115,"Oh, I don’t know man. I haven’t talked to her in like ten years.",Chandler,neutral,neutral,106,5,6,18,"00:02:17,846","00:02:21,306" 1052 | 1116,I am.,Phoebe,neutral,neutral,107,0,6,20,"00:02:38,000","00:02:39,575" 1053 | 1117,"Joey, what are you talking about? You’re a terrific actor.",Rachel,neutral,neutral,107,1,6,20,"00:02:41,578","00:02:44,454" 1054 | 1118,You really think so?,Joey,surprise,positive,107,2,6,20,"0:02:44,789","0:02:45,501" 1055 | 1119,"Ugh, how can you even ask that question?!",Rachel,surprise,positive,107,3,6,20,"0:02:45,501","0:02:48,182" 1056 | 1120,Ross! Get a shot of this. (He's carrying an issue of the,Joey,surprise,positive,108,0,5,3,"00:05:14,564","00:05:18,025" 1057 | 1121,"Oh, okay, I'm having another one!",Phoebe,fear,negative,108,1,5,3,"00:05:35,126","00:05:37,669" 1058 | 1122,"This one doesn't hurt either—Ooh, yes it does!",Phoebe,surprise,negative,108,2,5,3,"00:05:37,879","00:05:40,756" 1059 | 1123,Ow!,Phoebe,anger,negative,108,3,5,3,"00:05:39,756","00:05:40,756" 1060 | 1124,Ow!,Phoebe,anger,negative,108,4,5,3,"0:05:41,132","0:05:41,466" 1061 | 1125,Ow!,Phoebe,anger,negative,108,5,5,3,"0:05:41,466","0:05:41,550" 1062 | 1126,Ow!,Phoebe,anger,negative,108,6,5,3,"0:05:41,550","0:05:43,135" 1063 | 1127,Ooh!,Phoebe,surprise,negative,108,7,5,3,"00:05:43,676","00:05:45,385" 1064 | 1128,"Oh, I was kinda hoping that was it.",Phoebe,sadness,negative,108,8,5,3,"00:05:46,554","00:05:48,555" 1065 | 1129,"Hey, where are Monica and Rachel anyway?",Ross,neutral,neutral,108,9,5,3,"00:05:51,267","00:05:53,518" 1066 | 1131,"Yeah, I love you. Okay, bye! Hi!",Frank,joy,positive,108,10,5,3,"00:14:10,766","00:14:13,810" 1067 | 1132,Hi!,Rachel,joy,positive,108,11,5,3,"00:14:14,812","00:14:15,895" 1068 | 1133,"That was Alice's mom, she said she left five hours ago. She should be here by now!",Frank,fear,negative,108,12,5,3,"00:14:16,105","00:14:20,567" 1069 | 1134,"Oh, honey, don’t worry. She's gonna make it on time.",Rachel,neutral,neutral,108,13,5,3,"00:14:20,776","00:14:22,485" 1070 | 1135,Yeah.,Frank,neutral,neutral,108,14,5,3,"00:14:23,028","00:14:24,445" 1071 | 1136,I guess I set up the video camera to try and entice Joey.,Monica,neutral,neutral,109,0,5,9,"00:20:41,823","00:20:46,077" 1072 | 1137,But sadly I could not be enticed.,Joey,joy,positive,109,1,5,9,"00:20:47,371","00:20:50,331" 1073 | 1138,Unbelievable! I mean you really kept Joey's underwear?! Why? Why would you do that?!,Ross,disgust,negative,109,2,5,9,"00:20:51,875","00:20:58,714" 1074 | 1139,I'm Monica. I'm disgusting. I stalk guys and keep their underpants.,Monica,sadness,negative,109,3,5,9,"00:21:02,594","00:21:11,185" 1075 | 1140,"Well, I think we've all learned something about who's disgusting and who's not.",Joey,anger,negative,109,4,5,9,"00:21:15,148","00:21:20,403" 1076 | 1141,Eh?,Joey,neutral,neutral,109,5,5,9,"00:21:20,570","00:21:21,988" 1077 | 1142,"All right, now, I'm going to get back to my bucket.",Joey,neutral,neutral,109,6,5,9,"00:21:22,155","00:21:26,242" 1078 | 1143,"I'm only eating the skin, so the chicken's up for grabs.",Joey,neutral,neutral,109,7,5,9,"00:21:27,703","00:21:30,913" 1079 | 1145,"Ohh, okay, they gave you the old time pricing.",Phoebe,neutral,neutral,110,0,6,11,"0:06:52,412","0:06:54,874" 1080 | 1146,Yeah.,Rachel,neutral,neutral,110,1,6,11,"0:06:54,874","0:06:56,125" 1081 | 1147,"Well, what period is it from?",Phoebe,neutral,neutral,110,2,6,11,"00:06:57,417","00:06:59,167" 1082 | 1148,"Uh, it’s from yore. Like the days of yore. Y’know?",Rachel,neutral,neutral,110,3,6,11,"00:06:59,335","00:07:03,380" 1083 | 1149,"Yes, yes I do.",Phoebe,neutral,neutral,110,4,6,11,"00:07:03,589","00:07:05,757" 1084 | 1150,"God, oh it’s just perfect!",Phoebe,joy,positive,110,5,6,11,"00:07:05,925","00:07:09,219" 1085 | 1152,I bet it has a great story behind it too.,Phoebe,joy,positive,110,6,6,11,"00:07:09,387","00:07:11,596" 1086 | 1153,Did they tell you anything?,Phoebe,neutral,neutral,110,7,6,11,"00:07:11,764","00:07:13,890" 1087 | 1155,"Yes! That I know, this is from White Plains.",Rachel,joy,positive,110,8,6,11,"00:07:14,058","00:07:16,935" 1088 | 1156,"White Plains. Oh, it sounds like such a magical place.",Phoebe,joy,positive,110,9,6,11,"00:07:19,188","00:07:23,608" 1089 | 1157,"So, you still don’t think I’m boyfriend material?",Chandler,anger,negative,111,0,3,25,"00:11:50,876","00:11:55,588" 1090 | 1158,Huh?,Monica,neutral,neutral,111,1,3,25,"00:11:56,298","00:11:57,340" 1091 | 1159,I saw you checking me out during the game last night.,Chandler,neutral,neutral,111,2,3,25,"00:11:57,508","00:12:00,844" 1092 | 1160,"I, umm, shut up!",Phoebe,anger,negative,112,0,4,1,"00:13:29,892","00:13:32,101" 1093 | 1161,“Good-bye Phoebe and Ursula. I’ll miss you. P.S. Your Mom lives in Montauk.” You just wrote this!,Phoebe,sadness,negative,112,1,4,1,"00:13:36,732","00:13:44,781" 1094 | 1162,"Well, it’s pretty much the gist. Well, except for the poem. You read the poem, right?",Ursula,neutral,neutral,112,2,4,1,"00:13:45,991","00:13:53,331" 1095 | 1163,Noooo!!,Phoebe,sadness,negative,112,3,4,1,"00:13:53,499","00:13:55,166" 1096 | 1164,"All right, hang on!",Ursula,neutral,neutral,112,4,4,1,"00:13:55,918","00:13:57,752" 1097 | 1165,"Rachel, it’s going to happen. Chandler is gonna move in here.",Monica,neutral,neutral,113,0,6,2,"00:18:52,923","00:18:59,303" 1098 | 1166,But I,Rachel,sadness,negative,113,1,6,2,"0:18:59,513","0:19:00,015" 1099 | 1167,"No-no, wait!",Monica,neutral,neutral,113,2,6,2,"0:19:00,015","0:19:02,147" 1100 | 1168,"Just let me finish, okay?",Monica,sadness,negative,113,3,6,2,"0:19:02,147","0:19:02,469" 1101 | 1169,"This isn’t something that we just, we just impulsively decided in-in Vegas, this is something we both really want.",Monica,neutral,neutral,113,4,6,2,"00:19:03,308","00:19:09,856" 1102 | 1170,And it,Monica,neutral,neutral,113,5,6,2,"00:19:11,525","00:19:14,068" 1103 | 1171,It is? Really?,Rachel,surprise,negative,113,6,6,2,"00:19:14,862","00:19:19,699" 1104 | 1172,"Yeah, sweetie.",Monica,neutral,neutral,113,7,6,2,"00:19:20,159","00:19:21,826" 1105 | 1173,"I mean we’re not, we’re not gonna live together anymore?",Rachel,sadness,negative,113,8,6,2,"00:19:23,620","00:19:27,540" 1106 | 1174,No.,Monica,sadness,negative,113,9,6,2,"00:19:28,792","00:19:29,876" 1107 | 1175,What? Oh my God! I’m gonna miss you so much!,Rachel,sadness,negative,113,10,6,2,"00:19:33,213","00:19:35,965" 1108 | 1176,I’m gonna miss you!,Monica,sadness,negative,113,11,6,2,"00:19:36,175","00:19:37,967" 1109 | 1177,I mean it’s the end of an era!,Rachel,sadness,negative,113,12,6,2,"00:19:39,094","00:19:40,928" 1110 | 1178,I know!,Monica,sadness,negative,113,13,6,2,"00:19:41,138","00:19:42,638" 1111 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Code for EMNLP2022 paper "Supervised Prototypical Contrastive Learning for Emotion Recognition in Conversation" 2 | 3 | [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/supervised-prototypical-contrastive-learning/emotion-recognition-in-conversation-on-4)](https://paperswithcode.com/sota/emotion-recognition-in-conversation-on-4?p=supervised-prototypical-contrastive-learning) 4 | [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/supervised-prototypical-contrastive-learning/emotion-recognition-in-conversation-on-meld)](https://paperswithcode.com/sota/emotion-recognition-in-conversation-on-meld?p=supervised-prototypical-contrastive-learning) 5 | [![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/supervised-prototypical-contrastive-learning/emotion-recognition-in-conversation-on)](https://paperswithcode.com/sota/emotion-recognition-in-conversation-on?p=supervised-prototypical-contrastive-learning) 6 | 7 | #### Overview 8 | 9 | The main contribution of this work is the supervised prototypical contrastive learning(SPCL) loss, it is easy to understand via the following picture. 10 | 11 | ![spcl](spcl.png) 12 | 13 | #### Requirements 14 | 15 | ``` 16 | pip install -r requirements 17 | ``` 18 | 19 | #### usage 20 | 21 | ``` 22 | python train.py 23 | -h, --help show this help message and exit 24 | -te, --test run test 25 | -tr, --train run train 26 | -ft, --finetune fine tune the best model 27 | -cl, --cl use CL 28 | -pr, --print_error print error case 29 | -mlp, --output_mlp use an additional mlp layer on the model output 30 | -fgm, --fgm use fgm 31 | -bsz BATCH_SIZE, --batch_size BATCH_SIZE 32 | Batch_size per gpu 33 | -seed SEED, --seed SEED 34 | seed 35 | -psz POOL_SIZE, --pool_size POOL_SIZE 36 | Batch_size per gpu 37 | -ssz SUPPORT_SET_SIZE, --support_set_size SUPPORT_SET_SIZE 38 | support size per gpu 39 | -epochs EPOCHS, --epochs EPOCHS 40 | -cluster_size AVG_CLUSTER_SIZE, --avg_cluster_size AVG_CLUSTER_SIZE 41 | avg_cluster_size 42 | -lr LR, --lr LR learning rate 43 | -ptmlr PTMLR, --ptmlr PTMLR 44 | ptm learning rate 45 | -tsk TASK_NAME, --task_name TASK_NAME 46 | it can be meld, iemocap and emorynlp 47 | -wp WARM_UP, --warm_up WARM_UP 48 | -dpt DROPOUT, --dropout DROPOUT 49 | -temp TEMPERATURE, --temperature TEMPERATURE 50 | -bert_path BERT_PATH, --bert_path BERT_PATH 51 | -train_obj TRAIN_OBJ, --train_obj TRAIN_OBJ 52 | it can be spcl, spdcl or ce 53 | -data_path DATA_PATH, --data_path DATA_PATH 54 | -temp_path TEMP_PATH, --temp_path TEMP_PATH 55 | -acc_step ACCUMULATION_STEPS, --accumulation_steps ACCUMULATION_STEPS 56 | 57 | ``` 58 | 59 | to train and eval the model, 60 | 61 | ```bash 62 | python train.py -tr -wp 128 -epochs 16 -temp 0.05 -tsk meld|iemocap|emorynlp -psz 256 -ssz 64 -train_obj spcl|spdcl|ce -cl -seed 2333 63 | ``` 64 | e.g., to train the model on the meld dataset via spcl, 65 | 66 | ```bash 67 | python train.py -tr -wp 128 -epochs 16 -temp 0.05 -tsk meld -psz 256 -ssz 64 -train_obj spcl -cl -seed 2333 68 | ``` 69 | 70 | #### key args 71 | 72 | - ```epochs``` we use epochs to control the difficulty. 73 | - ```psz``` size of representations queue 74 | - ```ssz``` size of support set 75 | - ```train_obj``` we describe the spcl in our paper, and an explanation of spdcl can be seen below 76 | - ```temp``` the temperature used in contrastive loss 77 | 78 | 79 | We use grid search to select the optim values for these args, but as we described in the ```Limitations```, we introduce too many randomness in our code, the optim values of these hyper-parameters changed with the seed. 80 | 81 | 82 | #### what is ```spdcl```? 83 | 84 | We describe the ```spcl``` loss in our paper, meanwhile we develop the **decoupled** version of ```spcl```, called ```spdcl```, since the decoupled contrastive loss (https://arxiv.org/pdf/2110.06848.pdf) is not the contribution of this paper, we didn't describe this loss in our paper, and all results in the experiments are produced via ```spcl```. 85 | 86 | The ```spdcl``` shows similar performance with ```spcl``` , if you have limited computing resources, the ```spdcl``` may a better choice. See details in ```spcl_loss.py```. 87 | 88 | If you have any questions, feel free to create issues or contact me at ```songxiaohui@iie.ac.cn``` or ```fpcsong@gmail.com```. 89 | -------------------------------------------------------------------------------- /clean.sh: -------------------------------------------------------------------------------- 1 | rm -r temp/* -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | import copy 2 | import functools 3 | import json 4 | import logging 5 | import multiprocessing 6 | import operator 7 | import os 8 | import pickle 9 | import random 10 | import time 11 | import timeit 12 | import warnings 13 | from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser 14 | from collections import OrderedDict as odict 15 | from typing import Optional 16 | import tempfile 17 | import shutil 18 | import matplotlib.pyplot as plt 19 | import numpy as np 20 | import pandas as pd 21 | import torch 22 | import torch.nn.functional as F 23 | import torch.nn as nn 24 | import vocab 25 | # from kmeans_pytorch import kmeans 26 | from sklearn.manifold import TSNE 27 | from sklearn.metrics import f1_score 28 | from torch.utils.data import (DataLoader, Dataset, RandomSampler, 29 | SequentialSampler, TensorDataset) 30 | from torch.utils.data.distributed import DistributedSampler 31 | from tqdm import tqdm, trange 32 | from transformers import AutoModel, AutoTokenizer 33 | from transformers import get_linear_schedule_with_warmup 34 | 35 | logger = logging.getLogger(__name__) 36 | 37 | logging.basicConfig(level=logging.INFO) 38 | warnings.simplefilter(action='ignore', category=FutureWarning) 39 | 40 | CONFIG = { 41 | 'bert_path': 'princeton-nlp/sup-simcse-roberta-large', 42 | 'epochs' : 10, 43 | 'lr' : 1e-3, 44 | 'ptmlr' : 1e-5, 45 | 'batch_size' : 32, 46 | 'max_len' : 256, 47 | 'bert_dim' : 1024, 48 | 'pad_value' : 1, 49 | 'mask_value' : 2, 50 | 'dropout' : 0.1, 51 | 'pool_size': 512, 52 | 'support_set_size': 64, 53 | 'num_classes' : 7, 54 | 'warm_up' : 128, 55 | 'dist_func': 'cosine', 56 | 'data_path' : './MELD', 57 | 'accumulation_steps' : 1, 58 | 'avg_cluster_size' : 4096, 59 | 'max_step' : 1024, 60 | 'num_positive': 1, 61 | 'ratio':1, 62 | 'mu':0.5, 63 | 'cl':True, 64 | 'temperature': 0.08, 65 | 'fgm': False, 66 | 'train_obj': 'psup', 67 | 'speaker_vocab' : '', 68 | 'emotion_vocab' : '', 69 | 'temp_path': '', 70 | 'ngpus' : torch.cuda.device_count(), 71 | 'device': torch.device('cuda' if torch.cuda.is_available() else 'cpu') 72 | } 73 | 74 | tokenizer = AutoTokenizer.from_pretrained(CONFIG['bert_path'], local_files_only=False) 75 | _special_tokens_ids = tokenizer('')['input_ids'] 76 | CLS = _special_tokens_ids[0] 77 | MASK = _special_tokens_ids[1] 78 | SEP = _special_tokens_ids[2] 79 | CONFIG['CLS'] = CLS 80 | CONFIG['SEP'] = SEP 81 | CONFIG['mask_value'] = MASK 82 | 83 | 84 | def dist(x, y): 85 | 86 | return (1-F.cosine_similarity(x, y, dim=-1))/2 + 1e-8 87 | 88 | def score_func(x, y): 89 | 90 | return (1+F.cosine_similarity(x, y, dim=-1))/2 + 1e-8 91 | 92 | def set_seed(seed): 93 | random.seed(seed) 94 | np.random.seed(seed) 95 | torch.manual_seed(seed) 96 | if torch.cuda.is_available(): 97 | torch.cuda.manual_seed_all(seed) -------------------------------------------------------------------------------- /data_process.py: -------------------------------------------------------------------------------- 1 | from config import * 2 | 3 | def pad_to_len(list_data, max_len, pad_value): 4 | list_data = list_data[-max_len:] 5 | len_to_pad = max_len - len(list_data) 6 | pads = [pad_value] * len_to_pad 7 | list_data.extend(pads) 8 | return list_data 9 | 10 | def get_emorynlp_vocabs(file_paths): 11 | emotion_vocab = vocab.Vocab() 12 | # keep 'neutral' in index-0 13 | emotion_vocab.word2index('neutral', train=True) 14 | for file_path in file_paths: 15 | data = json.load(open(file_path, 'r'), encoding='utf8') 16 | for episode in tqdm(data['episodes'], 17 | desc='processing file {}'.format(file_path), disable=CONFIG['local_rank'] not in [-1, 0]): 18 | for scene in episode['scenes']: 19 | for utterance in scene['utterances']: 20 | emotion = utterance['emotion'].lower() 21 | emotion_vocab.word2index(emotion, train=True) 22 | if CONFIG['local_rank'] in [-1, 0]: 23 | torch.save(emotion_vocab.to_dict(), CONFIG['emotion_vocab']) 24 | logging.info('total {} emotions'.format(len(emotion_vocab))) 25 | 26 | def get_meld_vocabs(file_paths): 27 | emotion_vocab = vocab.Vocab() 28 | # keep 'neutral' in index-0 29 | emotion_vocab.word2index('neutral', train=True) 30 | # global speaker_vocab, emotion_vocab 31 | for file_path in file_paths: 32 | data = pd.read_csv(file_path) 33 | for row in tqdm(data.iterrows(), 34 | desc='get vocab from {}'.format(file_path), disable=CONFIG['local_rank'] not in [-1, 0]): 35 | meta = row[1] 36 | emotion = meta['Emotion'].lower() 37 | emotion_vocab.word2index(emotion, train=True) 38 | if CONFIG['local_rank'] in [-1, 0]: 39 | torch.save(emotion_vocab.to_dict(), CONFIG['emotion_vocab']) 40 | logging.info('total {} emotions'.format(len(emotion_vocab))) 41 | 42 | 43 | def build_dataset(dialogues, train=False): 44 | ret_utterances = [] 45 | ret_labels = [] 46 | for dialogue in dialogues: 47 | utterance_ids = [] 48 | query = 'For utterance:' 49 | query_ids = tokenizer(query)['input_ids'][1:-1] 50 | for idx, turn_data in enumerate(dialogue): 51 | text_with_speaker = turn_data['speaker'] + ':' + turn_data['text'] 52 | token_ids = tokenizer(text_with_speaker)['input_ids'][1:] 53 | utterance_ids.append(token_ids) 54 | if turn_data['label'] < 0: 55 | continue 56 | full_context = [CONFIG['CLS']] 57 | lidx = 0 58 | for lidx in range(idx): 59 | total_len = sum([len(item) for item in utterance_ids[lidx:]]) + 8 60 | if total_len + len(utterance_ids[idx]) <= CONFIG['max_len']: 61 | break 62 | lidx = max(lidx, idx-8) 63 | for item in utterance_ids[lidx:]: 64 | full_context.extend(item) 65 | 66 | query_idx = idx 67 | prompt = dialogue[query_idx]['speaker'] + ' feels ' 68 | full_query = query_ids + utterance_ids[query_idx] + tokenizer(prompt)['input_ids'][1:] 69 | input_ids = full_context + full_query 70 | input_ids = pad_to_len(input_ids, CONFIG['max_len'], CONFIG['pad_value']) 71 | ret_utterances.append(input_ids) 72 | ret_labels.append(dialogue[query_idx]['label']) 73 | 74 | if train and idx > 3 and torch.rand(1).item() < 0.2: 75 | query_idx = random.randint(lidx, idx-1) 76 | if dialogue[query_idx]['label'] < 0: 77 | continue 78 | prompt = dialogue[query_idx]['speaker'] + ' feels ' 79 | full_query = query_ids + utterance_ids[query_idx] + tokenizer(prompt)['input_ids'][1:] 80 | input_ids = full_context + full_query 81 | input_ids = pad_to_len(input_ids, CONFIG['max_len'], CONFIG['pad_value']) 82 | ret_utterances.append(input_ids) 83 | ret_labels.append(dialogue[query_idx]['label']) 84 | 85 | dataset = TensorDataset( 86 | torch.LongTensor(ret_utterances), 87 | torch.LongTensor(ret_labels) 88 | ) 89 | return dataset 90 | 91 | def get_iemocap_vocabs(file_paths): 92 | emotion_vocab = vocab.Vocab() 93 | emotion_vocab.word2index('neu', train=True) 94 | for file_path in file_paths: 95 | data = json.load(open(file_path, 'r'), encoding='utf8') 96 | for dialog in tqdm(data, 97 | desc='get vocab from {}'.format(file_path), disable=CONFIG['local_rank'] not in [-1, 0]): 98 | for utterance in dialog: 99 | emotion = utterance.get('label') 100 | if emotion is not None: 101 | emotion_vocab.word2index(emotion, train=True) 102 | if CONFIG['local_rank'] in [-1, 0]: 103 | torch.save(emotion_vocab.to_dict(), CONFIG['emotion_vocab']) 104 | logging.info('total {} emotions'.format(len(emotion_vocab))) 105 | 106 | def load_emorynlp_turn(file_path): 107 | emotion_vocab = vocab.Vocab.from_dict(torch.load(CONFIG['emotion_vocab'])) 108 | data = json.load(open(file_path, 'r'), encoding='utf8') 109 | dialogues = [] 110 | speaker_vocab = vocab.Vocab() 111 | for episode in tqdm(data['episodes'], 112 | desc='processing file {}'.format(file_path), disable=CONFIG['local_rank'] not in [-1, 0]): 113 | for scene in episode['scenes']: 114 | dialogue = [] 115 | for utterance in scene['utterances']: 116 | text = utterance['transcript'] 117 | speaker = utterance['speakers'][0] 118 | speaker = speaker.split(' ')[0] 119 | emotion = utterance['emotion'].lower() 120 | emotion_idx = emotion_vocab.word2index(emotion) 121 | turn_data = {} 122 | turn_data['speaker'] = speaker 123 | speaker_vocab.word2index(speaker, train=True) 124 | turn_data['text'] = text 125 | turn_data['label'] = emotion_idx 126 | dialogue.append(turn_data) 127 | dialogues.append(dialogue) 128 | # speaker_vocab = speaker_vocab.prune_by_count(30) 129 | # for speaker_name in speaker_vocab.counts.keys(): 130 | # tokenizer.add_tokens(speaker_name) 131 | return dialogues 132 | 133 | 134 | def load_meld_turn(file_path): 135 | emotion_vocab = vocab.Vocab.from_dict(torch.load(CONFIG['emotion_vocab'])) 136 | data = pd.read_csv(file_path) 137 | pre_dial_id = -1 138 | dialogues = [] 139 | dialogue = [] 140 | speaker_vocab = vocab.Vocab() 141 | for row in tqdm(data.iterrows(), 142 | desc='processing file {}'.format(file_path), disable=CONFIG['local_rank'] not in [-1, 0]): 143 | meta = row[1] 144 | text = meta['Utterance'].replace('’', '\'').replace("\"", '') 145 | speaker = meta['Speaker'] 146 | emotion = meta['Emotion'].lower() 147 | emotion_idx = emotion_vocab.word2index(emotion) 148 | turn_data = {} 149 | turn_data['speaker'] = speaker 150 | speaker_vocab.word2index(speaker, train=True) 151 | turn_data['text'] = text 152 | turn_data['label'] = emotion_idx 153 | 154 | dialogue_id = meta['Dialogue_ID'] 155 | if pre_dial_id == -1: 156 | pre_dial_id = dialogue_id 157 | if dialogue_id != pre_dial_id: 158 | dialogues.append(dialogue) 159 | dialogue = [] 160 | pre_dial_id = dialogue_id 161 | dialogue.append(turn_data) 162 | dialogues.append(dialogue) 163 | # speaker_vocab = speaker_vocab.prune_by_count(30) 164 | # for speaker_name in speaker_vocab.counts.keys(): 165 | # tokenizer.add_tokens(speaker_name) 166 | return dialogues 167 | 168 | def load_iemocap_turn(file_path): 169 | emotion_vocab = vocab.Vocab.from_dict(torch.load(CONFIG['emotion_vocab'])) 170 | data = json.load(open(file_path, 'r'), encoding='utf8') 171 | 172 | speaker_pools = json.load(open('./IEMOCAP/name_pool', 'r')) 173 | dialogues = [] 174 | for dialog in tqdm(data, 175 | desc='processing file {}'.format(file_path), 176 | disable=CONFIG['local_rank'] not in [-1, 0]): 177 | dialogue = [] 178 | t_vocab = vocab.Vocab() 179 | speaker_vocab = vocab.Vocab() 180 | for utterance in dialog: 181 | speaker = utterance.get('speaker').upper() 182 | text = utterance.get('text').replace('[LAUGHTER]', '') 183 | emotion = utterance.get('label') 184 | speaker = speaker_pools[t_vocab.word2index(speaker, train=True)] 185 | speaker_vocab.word2index(speaker, train=True) 186 | turn_data = {} 187 | turn_data['speaker'] = speaker 188 | turn_data['text'] = text 189 | if emotion is not None: 190 | emotion_idx = emotion_vocab.word2index(emotion) 191 | else: 192 | emotion_idx = -1 193 | turn_data['label'] = emotion_idx 194 | dialogue.append(turn_data) 195 | dialogues.append(dialogue) 196 | # speaker_vocab = speaker_vocab.prune_by_count(30) 197 | # for speaker_name in speaker_vocab.counts.keys(): 198 | # tokenizer.add_tokens(speaker_name) 199 | return dialogues -------------------------------------------------------------------------------- /model.py: -------------------------------------------------------------------------------- 1 | import torch 2 | import torch.nn as nn 3 | from transformers import AutoModel 4 | from sklearn.metrics import euclidean_distances 5 | import torch.nn.functional as F 6 | 7 | class CLModel(nn.Module): 8 | def __init__(self, config): 9 | super().__init__() 10 | self.config = config 11 | self.dropout = config['dropout'] 12 | self.num_classes = config['num_classes'] 13 | self.pad_value = config['pad_value'] 14 | self.mask_value = config['mask_value'] 15 | self.f_context_encoder = AutoModel.from_pretrained(config['bert_path'], 16 | local_files_only=False) 17 | num_embeddings, self.dim = self.f_context_encoder.embeddings.word_embeddings.weight.data.shape 18 | self.f_context_encoder.resize_token_embeddings(num_embeddings + 256) 19 | self.predictor = nn.Sequential( 20 | nn.Linear(self.dim, self.num_classes) 21 | ) 22 | self.g = nn.Sequential( 23 | nn.Linear(self.dim, self.dim), 24 | ) 25 | def device(self): 26 | return self.f_context_encoder.device 27 | 28 | def gen_f_reps(self, sentences): 29 | ''' 30 | generate vector representations for each turn of conversation 31 | ''' 32 | batch_size, max_len = sentences.shape[0], sentences.shape[-1] 33 | sentences = sentences.reshape(-1, max_len) 34 | mask = 1 - (sentences == (self.pad_value)).long() 35 | utterance_encoded = self.f_context_encoder( 36 | input_ids=sentences, 37 | attention_mask=mask, 38 | output_hidden_states=True, 39 | return_dict=True 40 | )['last_hidden_state'] 41 | mask_pos = (sentences == (self.mask_value)).long().max(1)[1] 42 | mask_outputs = utterance_encoded[torch.arange(mask_pos.shape[0]), mask_pos, :] 43 | # feature = torch.dropout(mask_outputs, 0.1, train=self.training) 44 | feature = mask_outputs 45 | if self.config['output_mlp']: 46 | feature = self.g(feature) 47 | return feature 48 | 49 | def forward(self, reps, centers, score_func): 50 | 51 | num_classes, num_centers = centers.shape[0], centers.shape[1] 52 | reps = reps.unsqueeze(1).expand(reps.shape[0], num_centers, -1) 53 | reps = reps.unsqueeze(1).expand(reps.shape[0], num_classes ,num_centers, -1) 54 | 55 | centers = centers.unsqueeze(0).expand(reps.shape[0], -1, -1, -1) 56 | # batch * turn, num_classes, num_centers 57 | sim_matrix = score_func(reps, centers) 58 | 59 | # batch * turn, num_calsses 60 | scores = sim_matrix 61 | return scores 62 | 63 | class FGM(): 64 | def __init__(self, model): 65 | self.model = model 66 | self.backup = {} 67 | self.emb_name = 'word_embeddings.weight' 68 | 69 | def attack(self, epsilon=1.): 70 | for name, param in self.model.named_parameters(): 71 | if param.requires_grad and self.emb_name in name: 72 | self.backup[name] = param.data.clone() 73 | norm = torch.norm(param.grad) 74 | if norm != 0 and not torch.isnan(norm): 75 | r_at = epsilon * param.grad / norm 76 | param.data.add_(r_at) 77 | 78 | def restore(self): 79 | for name, param in self.model.named_parameters(): 80 | if param.requires_grad and self.emb_name in name: 81 | assert name in self.backup 82 | param.data = self.backup[name] 83 | self.backup = {} 84 | 85 | def save_checkpoint(self): 86 | for name, param in self.model.named_parameters(): 87 | if param.requires_grad: 88 | self.backup[name] = param.data.clone() 89 | def load_checkpoint(self): 90 | for name, param in self.model.named_parameters(): 91 | if param.requires_grad: 92 | param.data = self.backup[name] 93 | 94 | -------------------------------------------------------------------------------- /plots/plot.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | from numpy import size 3 | fig = plt.figure(figsize=(8,10)) 4 | fig.tight_layout() 5 | plt.rc('font', family='Times New Roman') 6 | plt.subplots_adjust(wspace=0, hspace=0.5) 7 | plt.subplot(3,1,1) 8 | fz = 18 9 | rt = 12 10 | num_emotions = [1168, 1149, 739, 711, 620, 392] 11 | emotions = ['neutral', 'frustrated', 'sad', 'anger', 'excited', 'happy'] 12 | plt.bar(list(range(6)),num_emotions, width=0.5) 13 | plt.xticks(list(range(6)), emotions, fontsize=fz, rotation=rt) 14 | plt.title('IEMOCAP trainset.', fontsize=fz) 15 | 16 | plt.subplot(3,1,2) 17 | 18 | num_emotions = [3035, 2184, 1285, 1076, 900, 784, 671] 19 | emotions = ['neutral', 'joyful', 'scared', 'mad', 'peaceful','powerful', 'sad'] 20 | plt.bar(list(range(7)),num_emotions, width=0.5) 21 | plt.xticks(list(range(7)), emotions, fontsize=fz, rotation=rt) 22 | plt.title('EmoryNLP trainset.', fontsize=fz) 23 | 24 | plt.subplot(3,1,3) 25 | 26 | num_emotions = [4711, 1743, 1205, 1109, 683, 271, 268] 27 | emotions = ['neutral', 'joy', 'suprise', 'anger', 'sadness', 'disgust','fear'] 28 | plt.bar(list(range(7)),num_emotions, width=0.5) 29 | plt.xticks(list(range(7)), emotions, fontsize=fz, rotation=rt) 30 | plt.title('MELD trainset.', fontsize=fz) 31 | plt.savefig('./dist.pdf',bbox_inches='tight', dpi=600) 32 | plt.show() 33 | -------------------------------------------------------------------------------- /plots/plot_dif.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | import torch 4 | def gen_rand_point(x,y, r, num, label): 5 | ret = [] 6 | for _ in range(num): 7 | _r = np.random.rand(1)[0] * r 8 | theta = np.random.rand(1)[0] * np.pi * 2 9 | _x = _r * np.cos(theta) + x 10 | _y = _r * np.sin(theta) + y 11 | ret.append((_x, _y, label)) 12 | return ret 13 | 14 | def dif( x, y, center, centers): 15 | p = np.array([x,y]) 16 | dis_sum = 0 17 | for _center in centers: 18 | c = np.array(_center) 19 | dis_sum += np.linalg.norm(p-c) 20 | return np.linalg.norm(p-np.array(center)) / dis_sum 21 | 22 | if __name__ == '__main__': 23 | np.random.seed(0) 24 | centers = [[0,0], [2,5], [-0.5,4]] 25 | rs = [2,2,2.5] 26 | points = [] 27 | color = {} 28 | marker = {} 29 | color['class-0'] = 'xkcd:bright sky blue' 30 | color['class-1'] = 'cornflowerblue' 31 | color['class-2'] = 'hotpink' 32 | color['selection'] = 'limegreen' 33 | color['no-selection'] = 'slategrey' 34 | marker['class-0'] = 'p' 35 | marker['class-1'] = 'x' 36 | marker['class-2'] = 'D' 37 | marker['selection'] = '*' 38 | marker['no-selection'] = 'o' 39 | 40 | for idx in range(3): 41 | x,y = centers[idx] 42 | points.extend(gen_rand_point(x,y, rs[idx], 300 + idx * 50, idx)) 43 | 44 | tensor_points = [] 45 | tensor_labels = [] 46 | for p in points: 47 | tensor_points.extend([p[0], p[1]]) 48 | tensor_labels.append(p[2]) 49 | tensor_points = torch.FloatTensor(tensor_points).reshape(-1, 2) 50 | tensor_labels = torch.FloatTensor(tensor_labels) 51 | 52 | scores = [] 53 | for p in points: 54 | center_idx = p[2] 55 | center = centers[center_idx] 56 | scores.append(dif(p[0], p[1], center, centers)) 57 | sorted_idxs = np.argsort(np.array(scores)) 58 | sorted_idxs = torch.LongTensor(sorted_idxs) 59 | 60 | 61 | epochs = 10 62 | 63 | size = 3 64 | fig = plt.figure(figsize=(9, 3)) 65 | fig.tight_layout() 66 | plt.rc('font', family='Times New Roman') 67 | fz = 20 68 | plt.subplot(1,3,1) 69 | for label in range(3): 70 | idxs = (tensor_labels == label).long() 71 | num_data = idxs.sum() 72 | idxs = torch.argsort(idxs)[-num_data:] 73 | class_name = 'class-{}'.format(label) 74 | plt.scatter(tensor_points[idxs, 0], 75 | tensor_points[idxs, 1], 76 | label=class_name, c = color[class_name], marker=marker[class_name], s=size, alpha=0.7) 77 | plt.title('A. Original data', fontsize=fz, y=-0.2) 78 | # plt.legend(fontsize=fz) 79 | 80 | num_data = len(scores) 81 | # -------------------------- 82 | plt.subplot(1,3,2) 83 | no_selec = plt.scatter(tensor_points[:, 0], 84 | tensor_points[:, 1], 85 | label='-', c = color['no-selection'], marker=marker[class_name], s=size) 86 | idxs = sorted_idxs[:int(num_data*0.2)] 87 | selec = plt.scatter(tensor_points[idxs, 0], 88 | tensor_points[idxs, 1], 89 | label='selected', c = color['selection'], marker=marker['selection'], s=size) 90 | plt.title('B. The easiest 20%', fontsize=fz, y=-0.2) 91 | # plt.legend([selec], ['selected'], loc=4, fontsize=fz) 92 | #--------------------------- 93 | plt.subplot(1,3,3) 94 | no_selec = plt.scatter(tensor_points[:, 0], 95 | tensor_points[:, 1], 96 | label='-', c = color['no-selection'], marker=marker[class_name], s=size) 97 | idxs = sorted_idxs[-int(num_data*0.2):] 98 | selec = plt.scatter(tensor_points[idxs, 0], 99 | tensor_points[idxs, 1], 100 | label='selected', c = 'r', marker=marker['selection'], s=size) 101 | plt.title('C. The hardest 20%', fontsize=fz, y=-0.2) 102 | # plt.legend([selec], ['selected'], loc=4, fontsize=fz) 103 | #--------------------------- 104 | plt.savefig('./difficult.pdf',bbox_inches='tight', dpi=600) 105 | plt.show() -------------------------------------------------------------------------------- /plots/plot_selection.py: -------------------------------------------------------------------------------- 1 | import matplotlib.pyplot as plt 2 | import numpy as np 3 | import torch 4 | def gen_rand_point(x,y, r, num, label): 5 | ret = [] 6 | for _ in range(num): 7 | _r = np.random.rand(1)[0] * r 8 | theta = np.random.rand(1)[0] * np.pi * 2 9 | _x = _r * np.cos(theta) + x 10 | _y = _r * np.sin(theta) + y 11 | ret.append((_x, _y, label)) 12 | return ret 13 | 14 | def dif( x, y, center, centers): 15 | p = np.array([x,y]) 16 | dis_sum = 0 17 | for _center in centers: 18 | c = np.array(_center) 19 | dis_sum += np.linalg.norm(p-c) 20 | return np.linalg.norm(p-np.array(center)) / dis_sum 21 | 22 | if __name__ == '__main__': 23 | np.random.seed(0) 24 | centers = [[0,0], [2,5], [-0.5,4]] 25 | rs = [2,2,2.5] 26 | points = [] 27 | color = {} 28 | marker = {} 29 | color['class-0'] = 'xkcd:bright sky blue' 30 | color['class-1'] = 'cornflowerblue' 31 | color['class-2'] = 'hotpink' 32 | color['selection'] = 'limegreen' 33 | color['no-selection'] = 'slategrey' 34 | marker['class-0'] = 'p' 35 | marker['class-1'] = 'x' 36 | marker['class-2'] = 'D' 37 | marker['selection'] = '*' 38 | marker['no-selection'] = 'o' 39 | 40 | for idx in range(3): 41 | x,y = centers[idx] 42 | points.extend(gen_rand_point(x,y, rs[idx], 500 + idx * 50, idx)) 43 | 44 | tensor_points = [] 45 | tensor_labels = [] 46 | for p in points: 47 | tensor_points.extend([p[0], p[1]]) 48 | tensor_labels.append(p[2]) 49 | tensor_points = torch.FloatTensor(tensor_points).reshape(-1, 2) 50 | tensor_labels = torch.FloatTensor(tensor_labels) 51 | 52 | scores = [] 53 | for p in points: 54 | center_idx = p[2] 55 | center = centers[center_idx] 56 | scores.append(dif(p[0], p[1], center, centers)) 57 | sorted_idxs = np.argsort(np.array(scores)) 58 | sorted_idxs = torch.LongTensor(sorted_idxs) 59 | 60 | 61 | epochs = 10 62 | 63 | size = 5 64 | fig = plt.figure(figsize=(8, 8)) 65 | fig.tight_layout() 66 | plt.rc('font', family='Times New Roman') 67 | plt.subplots_adjust(wspace=0.1, hspace=0.3) 68 | fz = 20 69 | # plt.subplot(2,2,1) 70 | # for label in range(3): 71 | # idxs = (tensor_labels == label).long() 72 | # num_data = idxs.sum() 73 | # idxs = torch.argsort(idxs)[-num_data:] 74 | # class_name = 'class-{}'.format(label) 75 | # plt.scatter(tensor_points[idxs, 0], 76 | # tensor_points[idxs, 1], 77 | # label=class_name, c = color[class_name], marker=marker[class_name], s=size) 78 | # plt.title('A. Original data') 79 | # plt.legend() 80 | 81 | # -------------------------- 82 | plt.subplot(2,2,1) 83 | no_selec = plt.scatter(tensor_points[:, 0], 84 | tensor_points[:, 1], 85 | label='-', c = color['no-selection'], marker=marker['no-selection'], s=size) 86 | 87 | epoch = 0 88 | st = 1 - epoch / epochs 89 | ed = epoch / epochs 90 | num_data = len(scores) 91 | prob_list = [ 92 | st + (ed - st) / (num_data - 1) * i for i in range(num_data) 93 | ] 94 | prob_tensor = torch.FloatTensor(prob_list) 95 | sample = torch.bernoulli(prob_tensor).long() 96 | selection = sorted_idxs * sample 97 | idxs = selection[torch.nonzero(selection)] 98 | selec = plt.scatter(tensor_points[idxs, 0], 99 | tensor_points[idxs, 1], 100 | label='selected', c = color['selection'], marker=marker['selection'], s=size) 101 | plt.title('A. Selection@ epoch 0', fontsize=fz, y=-0.2) 102 | #--------------------------- 103 | 104 | 105 | plt.subplot(2,2,2) 106 | no_selec = plt.scatter(tensor_points[:, 0], 107 | tensor_points[:, 1], 108 | label='-', c = color['no-selection'], marker=marker['no-selection'], s=size) 109 | 110 | epoch = epochs 111 | st = 1 - epoch / epochs 112 | ed = epoch / epochs 113 | num_data = len(scores) 114 | prob_list = [ 115 | st + (ed - st) / (num_data - 1) * i for i in range(num_data) 116 | ] 117 | prob_tensor = torch.FloatTensor(prob_list) 118 | sample = torch.bernoulli(prob_tensor).long() 119 | selection = sorted_idxs * sample 120 | idxs = selection[torch.nonzero(selection)] 121 | selec = plt.scatter(tensor_points[idxs, 0], 122 | tensor_points[idxs, 1], 123 | label='selected', c = color['selection'], marker=marker['selection'], s=size) 124 | plt.title('B. Selection@ epoch R', fontsize=fz, y=-0.2) 125 | 126 | #-------------------------------- 127 | 128 | plt.subplot(4,2,5) 129 | plt.plot([0,1], [1,0]) 130 | plt.xticks(list(range(2)), ['easy', 'hard'], fontsize=fz) 131 | plt.title('C. a@ epoch 0', fontsize=fz, y=-0.4) 132 | plt.subplot(4,2,6) 133 | plt.plot([0,1], [0,1]) 134 | plt.xticks(list(range(2)), ['easy', 'hard'], fontsize=fz) 135 | plt.title('D. a@ epoch R', fontsize=fz, y=-0.4) 136 | plt.savefig('./selection.pdf',bbox_inches='tight', dpi=600) 137 | plt.show() -------------------------------------------------------------------------------- /relations: -------------------------------------------------------------------------------- 1 | Rachel, girlfriend, Ross 2 | Emily, ex-wife, Ross 3 | Carol, ex-wife, Ross 4 | Phoebe, make-out, Ross 5 | Bonnie, ex-girlfriend, Ross 6 | Charlie, ex-girlfriend, Ross 7 | Jill, dated, Ross 8 | Mona, ex-girlfriend, Ross 9 | Julie, ex-girlfriend, Ross 10 | Elizabeth, ex-girlfriend, Ross 11 | Janice, dated, Ross 12 | Cheryl, dated, Ross 13 | Chloe, dated, Ross 14 | Nora, kissed, Ross 15 | Mr. Tribbiani, father, Joey 16 | Mrs. Tribbiani, mother, Joey 17 | Nonnie, grandmother, Joey 18 | Nonna, grandmother, Joey 19 | Gina, older sister, Joey 20 | Tina, younger sister, Joey 21 | Dina, youngest sister, Joey 22 | Mary-Angela, younger sister, Joey 23 | Mary-Therese, younger sister, Joey 24 | Veronica, younger sister, Joey 25 | Cookie, younger sister, Joey 26 | Jimmy, brother-in-law, Joey 27 | Michael, nephew, Joey 28 | Ross, boyfriend, Rachel 29 | Paolo, ex-boyfriend, Rachel 30 | Paul, ex-boyfriend, Rachel 31 | Tag, ex-boyfriend, Rachel 32 | Joshua, ex-boyfriend, Rachel 33 | Danny, ex-boyfriend, Rachel 34 | Joey, ex-boyfriend, Rachel 35 | Barry, ex-fiancé, Rachel 36 | Phoebe, kissed, Rachel 37 | Monica, kissed, Rachel 38 | Chandler, kissed, Rachel 39 | Chip, ex-boyfriend, Rachel 40 | Melissa, make-out, Rachel 41 | Gary, ex-boyfriend, Phoebe 42 | Parker, ex-boyfriend, Phoebe 43 | David, ex-boyfriend, Phoebe 44 | Ross, make-out, Phoebe 45 | Joey, kissed, Phoebe 46 | Eric, ex-boyfriend, Phoebe 47 | Malcolm, ex-boyfriend, Phoebe 48 | Rachel, kissed, Phoebe 49 | Mike, husband, Phoebe 50 | Duncan, ex-husband, Phoebe 51 | Jack, father, Monica 52 | Judy, mother, Monica 53 | Ross, brother, Monica 54 | Althea, grandmother, Monica 55 | Ben, nephew, Monica 56 | Emma, niece, Monica 57 | Cassie, cousin, Monica 58 | Frannie, cousin, Monica 59 | Lillian, aunt, Monica 60 | Phylis, aunt, Monica 61 | Jack, son, Monica 62 | Erica, daughter, Monica 63 | Chandler, husband, Monica 64 | Charles, father-in-law, Monica 65 | Nora, mother-in-law, Monica 66 | Emily, ex-sister-in-law, Monica 67 | Carol, ex-sister-in-law, Monica 68 | Stuart, cousin-in-law, Monica 69 | Pete, ex-boyfriend, Monica 70 | Richard, ex-boyfriend, Monica 71 | Stuart, ex-boyfriend, Monica 72 | Julio, ex-boyfriend, Monica 73 | Bobby, ex-boyfriend, Monica 74 | Monica, wife, Chandler 75 | Ross, brother-in-law, Chandler 76 | Mr. Geller, father-in-law, Chandler 77 | Mrs. Geller, mother-in-law, Chandler 78 | Ben Geller, nephew/godson, Chandler 79 | Emma, niece/goddaughter, Chandler 80 | Cassie, cousin-in-law, Chandler 81 | Cousin, cousin-in-law, Chandler 82 | Aunt Lillian, aunt-in-law, Chandler 83 | Althea, grandmother-in-law, Chandler 84 | Althea's husband, grandfather-in-law, Chandler 85 | Aunt Liddy, aunt-in-law, Chandler 86 | Aunt Sylvia, aunt-in-law, Chandler 87 | Aunt Phylis, aunt-in-law, Chandler 88 | Uncle Freddie, uncle-in-law, Chandler 89 | Aunt Cheryl, aunt-in-law, Chandler 90 | Aunt Lisa, aunt-in-law, Chandler 91 | Aunt Marilyn, aunt-in-law, Chandler 92 | Aunt Millie, aunt-in-law, Chandler 93 | Uncle Dan, uncle-in-law, Chandler 94 | Uncle Murray, uncle-in-law, Chandler 95 | Kathy, ex-girlfriend, Chandler 96 | Janice, ex-girlfriend, Chandler 97 | Joanna, ex-girlfriend, Chandler 98 | Joey, kissed, Chandler 99 | George, assumed father, Carol 100 | Adelaide, assumed mother, Carol 101 | Minnie, grandmother, Carol 102 | Ben, son, Carol 103 | Ross, ex-husband, Carol 104 | Mr. Geller, ex-father-in-law, Carol 105 | Mis. Geller, ex-mother-in-law, Carol 106 | Monica, ex-sister-in-law, Carol 107 | Susan, wife, Carol 108 | Mr. Bunch, father-in-law, Carol 109 | Mrs. Bunch, mother-in-law, Carol 110 | Gary, ex-husband, Janice 111 | Sid, husband, Janice 112 | Aaron, son with Sid, Janice 113 | Chandler, ex-boyfriend, Janice 114 | Ross, ex-boyfriend, Janice 115 | Rachel, ex-girlfriend, Tag 116 | Stephen, father, Emily 117 | Mrs. Waltham, mother, Emily 118 | Andrea, stepmother, Emily 119 | Mr. Waltham, paternal uncle, Emily 120 | Ross, ex-husband, Emily 121 | Ben, ex-stepson, Emily 122 | Mr. Geller, ex-father-in-law, Emily 123 | Mrs. Geller, ex-mother-in-law, Emily 124 | Monica, ex-sister-in-law, Emily 125 | Colin, ex-boyfriend, Emily 126 | Liam, ex-boyfriend, Emily 127 | Ross, ex-boyfriend, Mona 128 | Doug, Boss, Chandler 129 | Kara, ex-wife, Doug 130 | Frank Buffay, father, Frank 131 | Mrs. Buffay, mother, Frank 132 | Phoebe, paternal half-sister, Frank 133 | Ursula, paternal half-sister, Frank 134 | Mike, half-brother-in-law, Frank 135 | Alice, wife, Frank 136 | Frank Buffay Jr. Jr., son, Frank 137 | Chandler Buffay, daughter, Frank 138 | Leslie Buffay, daughter, Frank 139 | Chandler, ex-boyfriend, Joanna 140 | Monica, ex-girlfriend, Richard 141 | Barbara, ex-wife, Richard 142 | Rachel, ex-crush, Mark 143 | Nancy, fling, Mark 144 | Mrs. Robinson, wife, Mark 145 | Monica, ex-girlfriend, Pete 146 | Jamie, ex-girlfriend, Susan 147 | Carol, wife, Susan 148 | Krista, sister, Danny 149 | Rachel, dated, Danny 150 | Ross, son, Mr. Geller 151 | Monica, daughter, Mr. Geller 152 | Ben, grandson, Mr. Geller 153 | Emma, granddaughter, Mr. Geller 154 | Cassie, niece, Mr. Geller 155 | Jack, grandson, Mr. Geller 156 | Erica, granddaughter, Mr. Geller 157 | Mrs. Geller, wife, Mr. Geller 158 | Althea, mother-in-law, Mr. Geller 159 | Lillian, sister-in-law, Mr. Geller 160 | Phylis, sister-in-law, Mr. Geller 161 | Carol, ex-daughter-in-law, Mr. Geller 162 | Emily, ex-daughter-in-law, Mr. Geller 163 | Chandler, son-in-law, Mr. Geller 164 | Ross, ex-boyfriend, Julie 165 | Russ, boyfriend, Julie 166 | Ross, ex-boyfriend, Elizabeth 167 | Althea, mother, Mrs. Geller 168 | Lillian, sister, Mrs. Geller 169 | Phylis, sister, Mrs. Geller 170 | Ross, Oldest Son, Mrs. Geller 171 | Monica, Daughter, Mrs. Geller 172 | Ben Geer, grandson, Mrs. Geller 173 | Emma, granddaughter, Mrs. Geller 174 | Jack, grandson, Mrs. Geller 175 | Erica, granddaughter, Mrs. Geller 176 | Mr. Geller, husband, Mrs. Geller 177 | Freddie, brother-in-law, Mrs. Geller 178 | Carol, ex-daughter-in-law, Mrs. Geller 179 | Emily, ex-daughter-in-law, Mrs. Geller 180 | Chandler, son-in-law, Mrs. Geller 181 | Phoebe, daughter, Phoebe Sr 182 | Ursula, daughter, Phoebe Sr 183 | Frank, ex-boyfriend, Phoebe Sr 184 | Lily, ex-girlfriend, Phoebe Sr 185 | Mike, son-in-law, Phoebe Sr 186 | Duncan, ex-son-in-law, Phoebe Sr 187 | Rachel, ex-girlfriend, Paul 188 | Elizabeth, daughter, Paul 189 | Ursula, ex-fiancée, Eric 190 | Phoebe, ex-girlfriend, Eric 191 | Mr. Greene, father, Dr. Green 192 | Ida Greene, mother, Dr. Green 193 | Rachel, daughter, Dr. Green 194 | Jill, daughter, Dr. Green 195 | Amy, daughter, Dr. Green 196 | Emma, granddaughter, Dr. Green 197 | Sandra, ex-wife, Dr. Green 198 | Rachel, ex-girlfriend, Chip 199 | Amy, ex-girlfriend, Chip 200 | Monica, dated, Chip 201 | Nancy, ex-girlfriend, Chip 202 | Rachel, ex-fiancée, Barry 203 | Gunther, love, Rachel 204 | Joey, ex-boyfriend, Janine 205 | Billy, ex-boyfriend, Charlie 206 | Joey, ex-boyfriend, Charlie 207 | Ross, ex-boyfriend, Charlie 208 | Benjamin, boyfriend, Charlie 209 | Nonna, mother, Mr. Tribbiani 210 | Nonnie, mother-in-law, Mr. Tribbiani 211 | Gloria, wife, Mr. Tribbiani 212 | Joey, son, Mr. Tribbiani 213 | Gina, daughter, Mr. Tribbiani 214 | Tina, daughter, Mr. Tribbiani 215 | Dina, daughter, Mr. Tribbiani 216 | Mary-Angela, daughter, Mr. Tribbiani 217 | Mary-Therese, daughter, Mr. Tribbiani 218 | Veronica, daughter, Mr. Tribbiani 219 | Cookie, daughter, Mr. Tribbiani 220 | Ronni, mistress, Mr. Tribbiani 221 | Rachel, ex-girlfriend, Joshua 222 | Phoebe, ex-girlfriend, David 223 | Mr. Geller, uncle, Cassie 224 | Mrs. Geller, aunt, Cassie 225 | Marilyn, aunt, Cassie 226 | Ross, cousin, Cassie 227 | Monica, cousin, Cassie 228 | Chandler, cousin-in-law, Cassie 229 | Ben, first cousin once removed, Cassie 230 | Emma, first cousin once removed, Cassie 231 | Jack, adoptive first cousin once removed, Cassie 232 | Erica, adoptive first cousin once removed, Cassie 233 | Monica, ex-girlfriend, Julio 234 | Ross, father, Ben 235 | Carol, mother, Ben 236 | Emma, paternal half-sister, Ben 237 | Monica, paternal aunt, Ben 238 | Mr. Geller, paternal grandfather, Ben 239 | Mrs. Geller, paternal grandmother, Ben 240 | George, maternal grandfather, Ben 241 | Adelaide, maternal grandmother, Ben 242 | Minnie, maternal great-grandmother, Ben 243 | Althea, paternal great-grandmother, Ben 244 | Unnamed paternal great-grandfather 245 | Jack, paternal cousin, Ben 246 | Erica, paternal cousin, Ben 247 | Chandler, paternal uncle/godfather, Ben 248 | Susan, stepmother/adoptive mother, Ben 249 | Emily, ex-step-mother, Ben 250 | Mr. Bunch, step-grandfather, Ben 251 | Mrs. Bunch, step-grandmother, Ben 252 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | matplotlib==3.5.1 2 | numpy==1.21.5 3 | pandas==1.4.2 4 | scikit_learn==1.1.2 5 | torch==1.7.0 6 | tqdm==4.64.0 7 | transformers==4.18.0 8 | vocab==0.0.5 9 | -------------------------------------------------------------------------------- /spcl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caskcsg/SPCL/cd489397df93dc43bbe20e0e57b0814438666ad9/spcl.png -------------------------------------------------------------------------------- /spcl_loss.py: -------------------------------------------------------------------------------- 1 | from config import * 2 | 3 | class SupProtoConLoss(nn.Module): 4 | def __init__(self, num_classes, temp, pool_size, support_set_size, centers): 5 | super().__init__() 6 | self.temperature = temp 7 | self.default_centers = centers.squeeze() 8 | self.pools = {} 9 | for idx in range(num_classes): 10 | self.pools[idx] = [self.default_centers[idx]] 11 | self.num_classes = num_classes 12 | self.pool_size = pool_size 13 | self.K = support_set_size 14 | self.eps = 1e-8 15 | 16 | def score_func(self, x, y): 17 | return (1+F.cosine_similarity(x, y, dim=-1))/2 + self.eps 18 | 19 | def forward(self, reps, labels, decoupled=False): 20 | batch_size = reps.shape[0] 21 | curr_centers = [] 22 | pad_labels = [] 23 | # calculate temporary centers 24 | for idx in range(self.num_classes): 25 | if len(self.pools[idx]) >= self.K: 26 | # if len(self.pools[idx]) > 0: 27 | tensor_center = torch.stack(self.pools[idx], 0) 28 | perm = torch.randperm(tensor_center.size(0)) 29 | select_idx = perm[:self.K] 30 | curr_centers.append(tensor_center[select_idx].mean(0)) 31 | pad_labels.append(idx) 32 | else: 33 | curr_centers.append(self.default_centers[idx]) 34 | pad_labels.append(idx) 35 | curr_centers = torch.stack(curr_centers, 0) 36 | pad_labels = torch.LongTensor(pad_labels).to(reps.device) 37 | 38 | # update representations pools 39 | for idx in range(batch_size): 40 | label = labels[idx].item() 41 | self.pools[label].append(reps[idx].detach()) 42 | random.shuffle(self.pools[label]) 43 | self.pools[label] = self.pools[label][-self.pool_size:] 44 | 45 | concated_reps = torch.cat((reps, curr_centers), 0) 46 | concated_labels = torch.cat((labels, pad_labels), 0) 47 | concated_bsz = batch_size + curr_centers.shape[0] 48 | mask1 = concated_labels.unsqueeze(0).expand(concated_labels.shape[0], concated_labels.shape[0]) 49 | mask2 = concated_labels.unsqueeze(1).expand(concated_labels.shape[0], concated_labels.shape[0]) 50 | mask = 1 - torch.eye(concated_bsz).to(reps.device) 51 | pos_mask = (mask1 == mask2).long() 52 | rep1 = concated_reps.unsqueeze(0).expand(concated_bsz, concated_bsz, concated_reps.shape[-1]) 53 | rep2 = concated_reps.unsqueeze(1).expand(concated_bsz, concated_bsz, concated_reps.shape[-1]) 54 | scores = self.score_func(rep1, rep2) 55 | scores *= 1 - torch.eye(concated_bsz).to(scores.device) 56 | 57 | scores /= self.temperature 58 | scores = scores[:batch_size] 59 | pos_mask = pos_mask[:batch_size] 60 | mask = mask[:batch_size] 61 | scores -= torch.max(scores).item() 62 | 63 | if decoupled: 64 | pos_scores = scores * (pos_mask * mask) 65 | pos_scores = pos_scores.sum(-1) / ((pos_mask * mask).sum(-1) + self.eps) 66 | neg_scores = torch.exp(scores) * (1 - pos_mask) 67 | loss = -pos_scores + torch.log(neg_scores.sum(-1)+self.eps) 68 | loss_mask = (loss > 0).long() 69 | loss = (loss * loss_mask).sum() / (loss_mask.sum().item() + self.eps) 70 | else: 71 | scores = torch.exp(scores) 72 | pos_scores = scores * (pos_mask * mask) 73 | neg_scores = scores * (1 - pos_mask) 74 | probs = pos_scores.sum(-1)/(pos_scores.sum(-1) + neg_scores.sum(-1)) 75 | probs /= (pos_mask * mask).sum(-1) + self.eps 76 | loss = - torch.log(probs + self.eps) 77 | loss_mask = (loss > 0.3).long() 78 | loss = (loss * loss_mask).sum() / (loss_mask.sum().item() + self.eps) 79 | # loss = loss.mean() 80 | return loss 81 | -------------------------------------------------------------------------------- /speakers: -------------------------------------------------------------------------------- 1 | [('Ross', 1675), 2 | ('Joey', 1659), 3 | ('Rachel', 1599), 4 | ('Phoebe', 1506), 5 | ('Monica', 1436), 6 | ('Chandler', 1384), 7 | ('Carol', 59), 8 | ('Janice', 58), 9 | ('Tag', 48), 10 | ('Emily', 43), 11 | ('All', 43), 12 | ('Mona', 37), 13 | ('Doug', 35), 14 | ('Frank', 34), 15 | ('Joanna', 32), 16 | ('Richard', 31), 17 | ('Mark', 31), 18 | ('Pete', 30), 19 | ('Susan', 28), 20 | ('Danny', 27), 21 | ('Mr. Treeger', 25), 22 | ('Mr. Geller', 24), 23 | ('Julie', 24), 24 | ('Elizabeth', 23), 25 | ('Mrs. Geller', 22), 26 | ('Woman', 21), 27 | ('Phoebe Sr', 18), 28 | ('Paul', 18), 29 | ('Eric', 18), 30 | ('Dr. Green', 18), 31 | ('Earl', 17), 32 | ('Chip', 17), 33 | ('Barry', 17), 34 | ('Kate', 16), 35 | ('Gunther', 16), 36 | ('Janine', 14), 37 | ('Charlie', 14), 38 | ('Mr. Tribbiani', 13), 39 | ('Kristen', 13), 40 | ('Joshua', 13), 41 | ('Dr. Long', 13), 42 | ('David', 13), 43 | ('Cassie', 13), 44 | ('The Casting Director', 12), 45 | ('Russell', 12), 46 | ('Katie', 12), 47 | ('Julio', 12), 48 | ('Guy', 12), 49 | ('Dina', 12), 50 | ('Ben', 12), 51 | ('Stanley', 11), 52 | ('Policeman', 11), 53 | ('Man', 11), 54 | ('Lydia', 11), 55 | ('Jill', 11), 56 | ('Issac', 11), 57 | ('Gary', 11), 58 | ('Cliff', 11), 59 | ('Ursula', 10), 60 | ('The Interviewer', 10), 61 | ('The Cooking Teacher', 10), 62 | ('Robert', 10), 63 | ('Receptionist', 10), 64 | ('Mischa', 10), 65 | ('Kathy', 10), 66 | ('Bob', 10), 67 | ('Mr. Heckles', 9), 68 | ('Mike', 9), 69 | ('Krista', 9), 70 | ('Joey/Drake', 9), 71 | ('Isabella', 9), 72 | ('Estelle', 9), 73 | ('Dr. Baldhara', 9), 74 | ('Dana', 9), 75 | ('Chloe', 9), 76 | ('The Director', 8), 77 | ('Shelley', 8), 78 | ('Nurse', 8), 79 | ('Mr. Franklin', 8), 80 | ('Megan', 8), 81 | ('Kim', 8), 82 | ('Duncan', 8), 83 | ('The Potential Roommate', 7), 84 | ('Terry', 7), 85 | ('Larry', 7), 86 | ('Kyle', 7), 87 | ('Jim', 7), 88 | ('Young Ethan', 6), 89 | ('The Smoking Woman', 6), 90 | ('Student', 6), 91 | ('Steve', 6), 92 | ('Stage Director', 6), 93 | ('Mrs. Green', 6), 94 | ('Mindy', 6), 95 | ("Joey's Hand Twin", 6), 96 | ('Flight Attendant', 6), 97 | ('Fireman No. 3', 6), 98 | ('Evil Bitch', 6), 99 | ('Dr. Zane', 6), 100 | ('Alice', 6), 101 | ('The Security Guard', 5), 102 | ('The Museum Official', 5), 103 | ('The Fireman', 5), 104 | ('Teacher', 5), 105 | ('Sarah', 5), 106 | ('Rick', 5), 107 | ('Phoebe Sr.', 5), 108 | ('Nancy', 5), 109 | ('Mr. Burgin', 5), 110 | ('Melissa', 5), 111 | ('Max', 5), 112 | ('Kristin', 5), 113 | ('Girl', 5), 114 | ('Fake Monica', 5), 115 | ('Dr. Rhodes', 5), 116 | ('Director', 5), 117 | ('Carl', 5), 118 | ('Woman On Train', 4), 119 | ('Whitney', 4), 120 | ('Trudie Styler', 4), 121 | ('Tour Guide', 4), 122 | ('The Head Librarian', 4), 123 | ('Stranger', 4), 124 | ('Ronni', 4), 125 | ('Roger', 4), 126 | ('Paula', 4), 127 | ('Lorraine', 4), 128 | ('Leslie', 4), 129 | ('Lauren', 4), 130 | ('Kori', 4), 131 | ('Jester', 4), 132 | ('Jen', 4), 133 | ('Jade', 4), 134 | ('Dr. Miller', 4), 135 | ('Dr. Drake Remoray', 4), 136 | ('Bonnie', 4), 137 | ('Bobby', 4), 138 | ('Angela', 4), 139 | ('Allesandro', 4), 140 | ('Tony', 3), 141 | ('Tom', 3), 142 | ('Ticket Counter Attendant', 3), 143 | ('The Vendor', 3), 144 | ('The Lurker', 3), 145 | ('The Instructor', 3), 146 | ('The Hot Girl', 3), 147 | ('The Food Critic', 3), 148 | ('Supervisor', 3), 149 | ('Singer', 3), 150 | ('Ross and Rachel', 3), 151 | ('Richard’s Date', 3), 152 | ('Ms. McKenna', 3), 153 | ('Mr. Zelner', 3), 154 | ("Mona's Date", 3), 155 | ("Maitre d'", 3), 156 | ('Liam', 3), 157 | ('Joanne', 3), 158 | ('Jeannine', 3), 159 | ('Jane', 3), 160 | ('Hotel Clerk', 3), 161 | ('Hoshi', 3), 162 | ('Hitchhiker', 3), 163 | ('Customer', 3), 164 | ('Annabelle', 3), 165 | ('an', 2), 166 | ('Waitress', 2), 167 | ('Voice', 2), 168 | ('The Woman', 2), 169 | ('The Singing Man', 2), 170 | ('The Guys', 2), 171 | ('The Grip', 2), 172 | ('The Dry Cleaner', 2), 173 | ('TV Announcer', 2), 174 | ('Sophie', 2), 175 | ('Sick Bastard', 2), 176 | ('Santos', 2), 177 | ('Rachel/actress', 2), 178 | ('PBS Volunteer', 2), 179 | ('Older Scientist', 2), 180 | ('Mrs. Burgin', 2), 181 | ('Mr. Waltham', 2), 182 | ('Mr. Posner', 2), 183 | ('Marc', 2), 184 | ('Leader', 2), 185 | ('Kiki', 2), 186 | ('Jay Leno', 2), 187 | ('Jason', 2), 188 | ('Jake', 2), 189 | ('Hope', 2), 190 | ('Gerston', 2), 191 | ('Friend No. 2', 2), 192 | ('Fireman No. 2', 2), 193 | ('Fireman No. 1', 2), 194 | ('Dr. Wesley', 2), 195 | ('Dr. Oberman', 2), 196 | ('Dr. Ledbetter', 2), 197 | ('Dr. Harad', 2), 198 | ('Dr. Franzblau', 2), 199 | ('Doctor', 2), 200 | ('Charlton Heston', 2), 201 | ('Cecilia', 2), 202 | ('Casey', 2), 203 | ('Caitlin', 2), 204 | ('Bernice', 2), 205 | ('Another Scientist', 2), 206 | ('Airline Employee', 2), 207 | ('3rd Customer', 2), 208 | ('Wayne', 1), 209 | ('Waiter', 1), 210 | ('Vince', 1), 211 | ('The Presenter', 1), 212 | ('The Librarian', 1), 213 | ('The Croupier', 1), 214 | ('The Conductor', 1), 215 | ('The Cigarette Guy', 1), 216 | ('The Assistant Director', 1), 217 | ('The Acting Teacher', 1), 218 | ('Stu', 1), 219 | ('Stevens', 1), 220 | ('Stephanie', 1), 221 | ('Stage Manager', 1), 222 | ('Sergei', 1), 223 | ('Ross and Joey', 1), 224 | ('Robbie', 1), 225 | ('Raymond', 1), 226 | ('Rachel and Phoebe', 1), 227 | ('Professore Clerk', 1), 228 | ('Phoebe/Waitress', 1), 229 | ('Phoebe and Rachel', 1), 230 | ('Petrie', 1), 231 | ('Peter', 1), 232 | ('Passerby', 1), 233 | ('Paolo', 1), 234 | ('Paleontologist', 1), 235 | ('Nurse #2', 1), 236 | ('Nurse #1', 1), 237 | ('Mrs. Waltham', 1), 238 | ('Mrs. Tribbiani', 1), 239 | ('Mrs. Tedlock', 1), 240 | ('Mrs. Lynch', 1), 241 | ('Mrs. Chatracus', 1), 242 | ('Monica and Ross', 1), 243 | ('Monica and Rachel', 1), 244 | ('Monica and Phoebe', 1), 245 | ('Message', 1), 246 | ('Lecturer', 1), 247 | ('Joey and Ross', 1), 248 | ('Joey and Chandler', 1), 249 | ('Janitor', 1), 250 | ('Hombre Man', 1), 251 | ('Hold Voice', 1), 252 | ('Her-Friends', 1), 253 | ('Helena', 1), 254 | ('Guy #1', 1), 255 | ('Guru Saj', 1), 256 | ('Gary Collins', 1), 257 | ('Front Desk Clerk', 1), 258 | ('Friend No. 1', 1), 259 | ('Emeril', 1), 260 | ('Drunken Gambler', 1), 261 | ('Dr. Stryker Ramoray', 1), 262 | ('Dr. Leedbetter', 1), 263 | ('Dr. Johnson', 1), 264 | ('Cookie', 1), 265 | ('Commercial', 1), 266 | ('Burt', 1), 267 | ('Boy in the Cape', 1), 268 | ('Both', 1), 269 | ('Aunt Lillian', 1), 270 | ('Another Tour Guide', 1), 271 | ('A Student', 1), 272 | ('A Female Student', 1), 273 | ('2nd Customer', 1), 274 | ('1st Customer', 1)] -------------------------------------------------------------------------------- /speakers_desc: -------------------------------------------------------------------------------- 1 | 'Ross', 2 | 'Joey', 3 | 'Rachel', 4 | 'Phoebe', 5 | 'Monica', 6 | 'Chandler', 7 | 'Carol', 8 | 'Janice', 9 | 'Tag', 10 | 'Emily', 11 | 'All', 12 | 'Mona', 13 | 'Doug', 14 | 'Frank', 15 | 'Joanna', 16 | 'Richard', 17 | 'Mark', 18 | 'Pete', 19 | 'Susan', 20 | 'Danny', 21 | 'Mr. Treeger', 22 | 'Mr. Geller', 23 | 'Julie', 24 | 'Elizabeth', 25 | 'Mrs. Geller', 26 | 'Woman', 27 | 'Phoebe Sr', 28 | 'Paul', 29 | 'Eric', 30 | 'Dr. Green', 31 | 'Earl', 32 | 'Chip', 33 | 'Barry', 34 | 'Kate', 35 | 'Gunther', 36 | 'Janine', 37 | 'Charlie', 38 | 'Mr. Tribbiani', 39 | 'Kristen', 40 | 'Joshua', 41 | 'Dr. Long', 42 | 'David', 43 | 'Cassie', 44 | 'The Casting Director', 45 | 'Russell', 46 | 'Katie', 47 | 'Julio', 48 | 'Guy', 49 | 'Dina', 50 | 'Ben', 51 | 'Stanley', 52 | 'Policeman', 53 | 'Man', 54 | 'Lydia', 55 | 'Jill', 56 | 'Issac', 57 | 'Gary', 58 | 'Cliff', 59 | 'Ursula', 60 | 'The Interviewer', 61 | 'The Cooking Teacher', 62 | 'Robert', 63 | 'Receptionist', 64 | 'Mischa', 65 | 'Kathy', 66 | 'Bob', 67 | 'Mr. Heckles', 68 | 'Mike', 69 | 'Krista', 70 | 'Joey/Drake', 71 | 'Isabella', 72 | 'Estelle', 73 | 'Dr. Baldhara', 74 | 'Dana', 75 | 'Chloe', 76 | 'The Director', 77 | 'Shelley', 78 | 'Nurse', 79 | 'Mr. Franklin', 80 | 'Megan', 81 | 'Kim', 82 | 'Duncan', 83 | 'The Potential Roommate', 84 | 'Terry', 85 | 'Larry', 86 | 'Kyle', 87 | 'Jim', 88 | 'Young Ethan', 89 | 'The Smoking Woman', 90 | 'Student', 91 | 'Steve', 92 | 'Stage Director', 93 | 'Mrs. Green', 94 | 'Mindy', 95 | "Joey's Hand Twin", 96 | 'Flight Attendant', 97 | 'Fireman No. 3', 98 | 'Evil Bitch', 99 | 'Dr. Zane', 100 | 'Alice', 101 | 'The Security Guard', 102 | 'The Museum Official', 103 | 'The Fireman', 104 | 'Teacher', 105 | 'Sarah', 106 | 'Rick', 107 | 'Phoebe Sr.', 108 | 'Nancy', 109 | 'Mr. Burgin', 110 | 'Melissa', 111 | 'Max', 112 | 'Kristin', 113 | 'Girl', 114 | 'Fake Monica', 115 | 'Dr. Rhodes', 116 | 'Director', 117 | 'Carl', 118 | 'Woman On Train', 119 | 'Whitney', 120 | 'Trudie Styler', 121 | 'Tour Guide', 122 | 'The Head Librarian', 123 | 'Stranger', 124 | 'Ronni', 125 | 'Roger', 126 | 'Paula', 127 | 'Lorraine', 128 | 'Leslie', 129 | 'Lauren', 130 | 'Kori', 131 | 'Jester', 132 | 'Jen', 133 | 'Jade', 134 | 'Dr. Miller', 135 | 'Dr. Drake Remoray', 136 | 'Bonnie', 137 | 'Bobby', 138 | 'Angela', 139 | 'Allesandro', 140 | 'Tony', 141 | 'Tom', 142 | 'Ticket Counter Attendant', 143 | 'The Vendor', 144 | 'The Lurker', 145 | 'The Instructor', 146 | 'The Hot Girl', 147 | 'The Food Critic', 148 | 'Supervisor', 149 | 'Singer', 150 | 'Ross and Rachel', 151 | 'Richard’s Date', 152 | 'Ms. McKenna', 153 | 'Mr. Zelner', 154 | "Mona's Date", 155 | "Maitre d'", 156 | 'Liam', 157 | 'Joanne', 158 | 'Jeannine', 159 | 'Jane', 160 | 'Hotel Clerk', 161 | 'Hoshi', 162 | 'Hitchhiker', 163 | 'Customer', 164 | 'Annabelle', 165 | 'an', 166 | 'Waitress', 167 | 'Voice', 168 | 'The Woman', 169 | 'The Singing Man', 170 | 'The Guys', 171 | 'The Grip', 172 | 'The Dry Cleaner', 173 | 'TV Announcer', 174 | 'Sophie', 175 | 'Sick Bastard', 176 | 'Santos', 177 | 'Rachel/actress', 178 | 'PBS Volunteer', 179 | 'Older Scientist', 180 | 'Mrs. Burgin', 181 | 'Mr. Waltham', 182 | 'Mr. Posner', 183 | 'Marc', 184 | 'Leader', 185 | 'Kiki', 186 | 'Jay Leno', 187 | 'Jason', 188 | 'Jake', 189 | 'Hope', 190 | 'Gerston', 191 | 'Friend No. 2', 192 | 'Fireman No. 2', 193 | 'Fireman No. 1', 194 | 'Dr. Wesley', 195 | 'Dr. Oberman', 196 | 'Dr. Ledbetter', 197 | 'Dr. Harad', 198 | 'Dr. Franzblau', 199 | 'Doctor', 200 | 'Charlton Heston', 201 | 'Cecilia', 202 | 'Casey', 203 | 'Caitlin', 204 | 'Bernice', 205 | 'Another Scientist', 206 | 'Airline Employee', 207 | '3rd Customer', 208 | 'Wayne', 209 | 'Waiter', 210 | 'Vince', 211 | 'The Presenter', 212 | 'The Librarian', 213 | 'The Croupier', 214 | 'The Conductor', 215 | 'The Cigarette Guy', 216 | 'The Assistant Director', 217 | 'The Acting Teacher', 218 | 'Stu', 219 | 'Stevens', 220 | 'Stephanie', 221 | 'Stage Manager', 222 | 'Sergei', 223 | 'Ross and Joey', 224 | 'Robbie', 225 | 'Raymond', 226 | 'Rachel and Phoebe', 227 | 'Professore Clerk', 228 | 'Phoebe/Waitress', 229 | 'Phoebe and Rachel', 230 | 'Petrie', 231 | 'Peter', 232 | 'Passerby', 233 | 'Paolo', 234 | 'Paleontologist', 235 | 'Nurse #2', 236 | 'Nurse #1', 237 | 'Mrs. Waltham', 238 | 'Mrs. Tribbiani', 239 | 'Mrs. Tedlock', 240 | 'Mrs. Lynch', 241 | 'Mrs. Chatracus', 242 | 'Monica and Ross', 243 | 'Monica and Rachel', 244 | 'Monica and Phoebe', 245 | 'Message', 246 | 'Lecturer', 247 | 'Joey and Ross', 248 | 'Joey and Chandler', 249 | 'Janitor', 250 | 'Hombre Man', 251 | 'Hold Voice', 252 | 'Her-Friends', 253 | 'Helena', 254 | 'Guy #1', 255 | 'Guru Saj', 256 | 'Gary Collins', 257 | 'Front Desk Clerk', 258 | 'Friend No. 1', 259 | 'Emeril', 260 | 'Drunken Gambler', 261 | 'Dr. Stryker Ramoray', 262 | 'Dr. Leedbetter', 263 | 'Dr. Johnson', 264 | 'Cookie', 265 | 'Commercial', 266 | 'Burt', 267 | 'Boy in the Cape', 268 | 'Both', 269 | 'Aunt Lillian', 270 | 'Another Tour Guide', 271 | 'A Student', 272 | 'A Female Student', 273 | '2nd Customer', 274 | '1st Customer' -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- 1 | import transformers 2 | from config import * 3 | from model import CLModel, FGM 4 | 5 | from data_process import * 6 | from util_methods import * 7 | from spcl_loss import SupProtoConLoss 8 | 9 | def get_paramsgroup(model, warmup=False): 10 | no_decay = ['bias', 'LayerNorm.weight'] 11 | pre_train_lr = CONFIG['ptmlr'] 12 | 13 | bert_params = list(map(id, model.f_context_encoder.parameters())) 14 | params = [] 15 | warmup_params = [] 16 | for name, param in model.named_parameters(): 17 | lr = CONFIG['lr'] 18 | weight_decay = 0.01 19 | if id(param) in bert_params: 20 | lr = pre_train_lr 21 | if any(nd in name for nd in no_decay): 22 | weight_decay = 0 23 | params.append({ 24 | 'params': param, 25 | 'lr': lr, 26 | 'weight_decay': weight_decay 27 | }) 28 | warmup_params.append({ 29 | 'params': 30 | param, 31 | 'lr': 32 | CONFIG['ptmlr'] / 4 if id(param) in bert_params else lr, 33 | 'weight_decay': 34 | weight_decay 35 | }) 36 | if warmup: 37 | return warmup_params 38 | params = sorted(params, key=lambda x: x['lr']) 39 | return params 40 | 41 | 42 | def train_epoch(model, 43 | optimizer, 44 | lr_scheduler, 45 | trainset, 46 | centers, 47 | centers_mask=None, 48 | epoch=0, 49 | max_step=-1, 50 | train_obj='all'): 51 | model.train() 52 | inner_model = model.module if hasattr(model, 'module') else model 53 | ce_loss_func = torch.nn.CrossEntropyLoss(ignore_index=-1) 54 | spcl_loss = SupProtoConLoss( 55 | num_classes=CONFIG['num_classes'], 56 | temp=CONFIG['temperature'], 57 | pool_size=CONFIG['pool_size'], 58 | support_set_size=CONFIG['support_set_size'], 59 | centers=centers) 60 | accumulation_steps = CONFIG['accumulation_steps'] 61 | sampler = RandomSampler( 62 | trainset) if CONFIG['local_rank'] == -1 else DistributedSampler( 63 | trainset) 64 | if CONFIG['local_rank'] != -1: 65 | sampler.set_epoch(epoch) 66 | dataloader = DataLoader(trainset, 67 | batch_size=CONFIG['batch_size'], 68 | sampler=sampler, 69 | num_workers=0, 70 | drop_last=True) 71 | 72 | tq_train = tqdm(total=max_step if max_step > 0 else len(dataloader), 73 | position=1, 74 | disable=CONFIG['local_rank'] not in [-1, 0]) 75 | def calc_loss(sentences, emotion_idxs, labels): 76 | ccl_reps = inner_model.gen_f_reps(sentences) 77 | 78 | if train_obj == 'ce': 79 | direct_loss = ce_loss_func(inner_model.predictor(ccl_reps), 80 | emotion_idxs) 81 | else: 82 | direct_loss = ce_loss_func(inner_model.predictor(ccl_reps.detach()), 83 | emotion_idxs) 84 | ins_cl_loss = torch.zeros(1).to(CONFIG['device']) 85 | if train_obj == 'spcl': 86 | ins_cl_loss = spcl_loss(ccl_reps, labels) 87 | if train_obj == 'spdcl': 88 | ins_cl_loss = spcl_loss(ccl_reps, labels, decoupled=True) 89 | 90 | loss = direct_loss + ins_cl_loss 91 | 92 | tq_train.set_description( 93 | 'direct loss {:.2f}, instance_cl_loss {:.2f}' 94 | .format(direct_loss.item(), 95 | ins_cl_loss.item() if train_obj in ['spcl', 'spdcl'] else 0)) 96 | return loss 97 | 98 | fgm = FGM(inner_model) 99 | for batch_id, batch_data in enumerate(dataloader): 100 | batch_data = [x.to(inner_model.device()) for x in batch_data] 101 | 102 | sentences = batch_data[0] 103 | 104 | emotion_idxs = batch_data[1].reshape(-1) 105 | labels = batch_data[2].reshape(-1) 106 | 107 | loss = calc_loss(sentences, emotion_idxs, labels) 108 | loss = loss / accumulation_steps 109 | loss.backward() 110 | if CONFIG['fgm']: 111 | fgm.attack() 112 | loss = calc_loss(sentences, emotion_idxs, labels) 113 | loss = loss / accumulation_steps 114 | loss.backward() 115 | fgm.restore() 116 | 117 | nn.utils.clip_grad_norm_(inner_model.parameters(), max_norm=5, norm_type=2) 118 | tq_train.update() 119 | 120 | if batch_id % accumulation_steps == 0: 121 | optimizer.step() 122 | lr_scheduler.step() 123 | optimizer.zero_grad() 124 | if max_step > 0 and batch_id > max_step: 125 | optimizer.zero_grad() 126 | break 127 | optimizer.zero_grad() 128 | tq_train.close() 129 | 130 | def train(model, train_dialogues, dev_dialogues, test_dialogues): 131 | 132 | devset = build_dataset(dev_dialogues) 133 | testset = build_dataset(test_dialogues) 134 | 135 | tq_epoch = tqdm(total=CONFIG['epochs'], 136 | position=0, 137 | disable=CONFIG['local_rank'] not in [-1, 0]) 138 | centers = None 139 | 140 | if CONFIG['local_rank'] != -1: 141 | model = torch.nn.parallel.DistributedDataParallel( 142 | model, 143 | device_ids=[CONFIG['local_rank']], 144 | output_device=CONFIG['local_rank'], 145 | find_unused_parameters=True) 146 | optimizer = torch.optim.AdamW( 147 | get_paramsgroup( 148 | model.module if hasattr(model, 'module') else model)) 149 | checkpoint_saver = FGM(model) 150 | # train 151 | best_f1 = -1 152 | epochs_not_update = 0 153 | train_obj = CONFIG['train_obj'] 154 | for epoch in range(CONFIG['epochs']+1): 155 | tq_epoch.set_description('training on epoch {}'.format(epoch)) 156 | tq_epoch.update() 157 | 158 | trainset = build_dataset(train_dialogues, train=True) 159 | 160 | if CONFIG['local_rank'] in [-1, 0]: 161 | all_reps, all_corr_labels = gen_all_reps(model, trainset) 162 | 163 | logging.info('clustering...') 164 | centers, centers_mask, cluster2dataid, cluster2classid, all_centers = cluster( 165 | all_reps, all_corr_labels, init_centers=centers, epoch=epoch) 166 | num_data = all_reps.shape[0] 167 | if epoch > 0: 168 | f1 = test(model, 169 | devset, 170 | centers, 171 | centers_mask, 172 | desc='dev @ epoch {}'.format(epoch - 1)) 173 | if f1 > best_f1: 174 | epochs_not_update = 0 175 | os.system('rm {}/models/*'.format(CONFIG['temp_path'])) 176 | os.system('rm {}/centers/*'.format(CONFIG['temp_path'])) 177 | 178 | best_f1 = f1 179 | model_to_save = model.module if hasattr( 180 | model, "module") else model 181 | torch.save( 182 | model_to_save, CONFIG['temp_path'] + 183 | '/models/f1_{:.4f}_@epoch{}.pkl'.format( 184 | best_f1, epoch - 1)) 185 | torch.save( 186 | centers, CONFIG['temp_path'] + 187 | '/centers/f1_{:.4f}_@epoch{}.pkl'.format( 188 | best_f1, epoch - 1)) 189 | torch.save( 190 | centers_mask, CONFIG['temp_path'] + 191 | '/centers/f1_{:.4f}_@epoch{}.msk'.format( 192 | best_f1, epoch - 1)) 193 | 194 | f1 = test(model, 195 | testset, 196 | centers, 197 | centers_mask, 198 | desc='new best test @ epoch {}'.format( 199 | epoch - 1)) 200 | # checkpoint_saver.save_checkpoint() 201 | else: 202 | epochs_not_update += 1 203 | # checkpoint_saver.load_checkpoint() 204 | torch.cuda.empty_cache() 205 | if epochs_not_update >= 5: 206 | break 207 | 208 | selection, cluster_idxs = gen_cl_data(all_reps, 209 | all_centers, 210 | cluster2dataid, 211 | cluster2classid, 212 | epoch=epoch) 213 | # st = 1 - epoch / 10 214 | # ed = epoch / 10 215 | st = 1 - epoch / CONFIG['epochs'] 216 | ed = epoch / CONFIG['epochs'] 217 | num_data = len(selection) 218 | selection = torch.LongTensor(selection) 219 | prob_list = [ 220 | st + (ed - st) / (num_data - 1) * i for i in range(num_data) 221 | ] 222 | prob_tensor = torch.FloatTensor(prob_list) 223 | rand_prob_tensor = torch.bernoulli(torch.ones(num_data) * 0.5) 224 | if CONFIG['cl']: 225 | sample = torch.bernoulli(prob_tensor).long() 226 | else: 227 | sample = torch.bernoulli(rand_prob_tensor).long() 228 | selection = selection * sample 229 | sample_results = selection[torch.nonzero(selection)] 230 | all_idxs = sample_results.numpy().tolist() 231 | 232 | epoch_trainset = TensorDataset(trainset[all_idxs][0], 233 | trainset[all_idxs][1], 234 | cluster_idxs[all_idxs]) 235 | torch.save(epoch_trainset, 236 | CONFIG['temp_path'] + '/temp/train_set.pkl') 237 | torch.save(centers, CONFIG['temp_path'] + '/temp/centers.pkl') 238 | torch.save(centers_mask, 239 | CONFIG['temp_path'] + '/temp/centers_mask.pkl') 240 | if CONFIG['local_rank'] != -1: 241 | torch.distributed.barrier() 242 | 243 | epoch_trainset = torch.load(CONFIG['temp_path'] + 244 | '/temp/train_set.pkl', 245 | map_location=CONFIG['device']) 246 | centers = torch.load(CONFIG['temp_path'] + '/temp/centers.pkl', 247 | map_location=CONFIG['device']) 248 | centers_mask = torch.load(CONFIG['temp_path'] + 249 | '/temp/centers_mask.pkl', 250 | map_location=CONFIG['device']) 251 | num_training_steps = len(epoch_trainset)//(CONFIG['batch_size'] * CONFIG['accumulation_steps']) 252 | num_warmup_steps = min(CONFIG['warm_up'], num_training_steps) if epoch == 0 else 0 253 | lr_scheduler = transformers.get_cosine_schedule_with_warmup( 254 | optimizer, 255 | num_warmup_steps=num_warmup_steps, 256 | num_training_steps=num_training_steps 257 | ) 258 | if epoch < CONFIG['epochs']: 259 | train_epoch(model, 260 | optimizer, 261 | lr_scheduler, 262 | epoch_trainset, 263 | centers, 264 | centers_mask, 265 | epoch, 266 | train_obj=train_obj) 267 | 268 | tq_epoch.close() 269 | if CONFIG['local_rank'] in [0, -1]: 270 | model, centers, centers_mask = load_latest() 271 | f1 = test(model, testset, centers, centers_mask) 272 | print('best f1 test is {:.4f}'.format(f1), flush=True) 273 | os.system('rm -r {}'.format(CONFIG['temp_path'])) 274 | 275 | 276 | def test(model, data, centers, centers_mask, desc=''): 277 | 278 | model.eval() 279 | inner_model = model.module if hasattr(model, 'module') else model 280 | y_true_list = [] 281 | direct_list = [[], [], [], []] 282 | cluster_list = [[], [], [], []] 283 | sampler = SequentialSampler(data) 284 | dataloader = DataLoader( 285 | data, 286 | batch_size=CONFIG['batch_size'], 287 | sampler=sampler, 288 | num_workers=0, # multiprocessing.cpu_count() 289 | ) 290 | tq_test = tqdm(total=len(dataloader), desc="testing", position=2) 291 | for batch_id, batch_data in enumerate(dataloader): 292 | batch_data = [x.to(inner_model.device()) for x in batch_data] 293 | sentences = batch_data[0] 294 | emotion_idxs = batch_data[1].reshape(-1) 295 | with torch.no_grad(): 296 | ccl_reps = inner_model.gen_f_reps(sentences) 297 | cluster_outputs, direct_outputs = [], [] 298 | 299 | feature_list = [ccl_reps] 300 | num_feature = len(feature_list) 301 | 302 | for idx, feature in enumerate(feature_list): 303 | # 304 | outputs = inner_model(feature, centers, score_func) 305 | outputs -= (1 - centers_mask) * 2 306 | cluster_outputs.append(torch.argmax(outputs.max(-1)[0], -1)) 307 | direct_outputs.append( 308 | torch.argmax(inner_model.predictor(feature), -1)) 309 | for batch_id in range(emotion_idxs.shape[0]): 310 | if emotion_idxs[batch_id] > -1: 311 | for idx in range(num_feature): 312 | direct_list[idx].append( 313 | direct_outputs[idx][batch_id].item()) 314 | cluster_list[idx].append( 315 | cluster_outputs[idx][batch_id].item()) 316 | y_true_list.append(emotion_idxs[batch_id].item()) 317 | tq_test.update() 318 | direct_f1_scores = [ 319 | f1_score(y_true=y_true_list, 320 | y_pred=direct_list[idx], 321 | average='weighted') for idx in range(num_feature) 322 | ] 323 | cluster_f1_scores = [ 324 | f1_score(y_true=y_true_list, 325 | y_pred=cluster_list[idx], 326 | average='weighted') for idx in range(num_feature) 327 | ] 328 | 329 | # f1 = max(max(direct_f1_scores), max(cluster_f1_scores)) 330 | f1 = max(cluster_f1_scores) 331 | print('\n{} best w-f1 is {:.4f}'.format(desc, f1), flush=True) 332 | print('direct f1 cls {:.4f}'.format(*direct_f1_scores)) 333 | print('cluster f1 cls {:.4f}'.format(*cluster_f1_scores), 334 | flush=True) 335 | 336 | return f1 337 | 338 | 339 | def load_latest(): 340 | model_path = CONFIG['temp_path'] + '/models' 341 | lst = os.listdir(model_path) 342 | lst = list(filter(lambda item: item.endswith('.pkl'), lst)) 343 | lst.sort(key=lambda x: os.path.getmtime(os.path.join(model_path, x))) 344 | model = torch.load(os.path.join(model_path, lst[-1])) 345 | logging.info( 346 | 'model checkpoint {} is loaded'.format( 347 | os.path.join(model_path, lst[-1])), ) 348 | center_path = CONFIG['temp_path'] + '/centers' 349 | lst = os.listdir(center_path) 350 | lst = list(filter(lambda item: item.endswith('.pkl'), lst)) 351 | lst.sort(key=lambda x: os.path.getmtime(os.path.join(center_path, x))) 352 | centers = torch.load(os.path.join(center_path, lst[-1])) 353 | logging.info( 354 | 'center checkpoint {} is loaded'.format( 355 | os.path.join(center_path, lst[-1])), ) 356 | 357 | lst = os.listdir(center_path) 358 | lst = list(filter(lambda item: item.endswith('.msk'), lst)) 359 | lst.sort(key=lambda x: os.path.getmtime(os.path.join(center_path, x))) 360 | centers_mask = torch.load(os.path.join(center_path, lst[-1])) 361 | logging.info( 362 | 'centers mask checkpoint {} is loaded'.format( 363 | os.path.join(center_path, lst[-1])), ) 364 | 365 | return model, centers, centers_mask 366 | 367 | 368 | if __name__ == '__main__': 369 | parser = ArgumentParser() 370 | parser.add_argument('-te', 371 | '--test', 372 | action='store_true', 373 | help='run test', 374 | default=False) 375 | parser.add_argument('-tr', 376 | '--train', 377 | action='store_true', 378 | help='run train', 379 | default=False) 380 | parser.add_argument('-ft', 381 | '--finetune', 382 | action='store_true', 383 | help='fine tune the best model', 384 | default=False) 385 | parser.add_argument('-cl', 386 | '--cl', 387 | action='store_true', 388 | help='use CL', 389 | default=False) 390 | parser.add_argument('-pr', 391 | '--print_error', 392 | action='store_true', 393 | help='print error case', 394 | default=False) 395 | parser.add_argument('-mlp', 396 | '--output_mlp', 397 | action='store_true', 398 | help='use an additional mlp layer on the model output', 399 | default=False) 400 | parser.add_argument('-fgm', 401 | '--fgm', 402 | action='store_true', 403 | help='use fgm', 404 | default=False) 405 | parser.add_argument('-bsz', 406 | '--batch_size', 407 | help='Batch_size per gpu', 408 | required=False, 409 | default=CONFIG['batch_size'], 410 | type=int) 411 | parser.add_argument('-seed', 412 | '--seed', 413 | help='seed', 414 | required=False, 415 | default=42, 416 | type=int) 417 | parser.add_argument('-psz', 418 | '--pool_size', 419 | help='Batch_size per gpu', 420 | required=False, 421 | default=CONFIG['pool_size'], 422 | type=int) 423 | parser.add_argument('-ssz', 424 | '--support_set_size', 425 | help='support size per gpu', 426 | required=False, 427 | default=CONFIG['support_set_size'], 428 | type=int) 429 | parser.add_argument('-epochs', 430 | '--epochs', 431 | help='epochs', 432 | required=False, 433 | default=CONFIG['epochs'], 434 | type=int) 435 | parser.add_argument('-cluster_size', 436 | '--avg_cluster_size', 437 | help='avg_cluster_size', 438 | required=False, 439 | default=CONFIG['avg_cluster_size'], 440 | type=int) 441 | parser.add_argument('-lr', 442 | '--lr', 443 | help='learning rate', 444 | required=False, 445 | default=CONFIG['lr'], 446 | type=float) 447 | parser.add_argument('-ptmlr', 448 | '--ptmlr', 449 | help='ptm learning rate', 450 | required=False, 451 | default=CONFIG['ptmlr'], 452 | type=float) 453 | parser.add_argument('-tsk', '--task_name', default='meld', type=str) 454 | parser.add_argument('-fp16', 455 | '--fp_16', 456 | action='store_true', 457 | help='use fp 16', 458 | default=False) 459 | parser.add_argument('-wp', 460 | '--warm_up', 461 | default=CONFIG['warm_up'], 462 | type=int, 463 | required=False) 464 | parser.add_argument('-dpt', 465 | '--dropout', 466 | default=CONFIG['dropout'], 467 | type=float, 468 | required=False) 469 | parser.add_argument('-temp', 470 | '--temperature', 471 | default=CONFIG['temperature'], 472 | type=float, 473 | required=False) 474 | parser.add_argument('-bert_path', 475 | '--bert_path', 476 | default=CONFIG['bert_path'], 477 | type=str, 478 | required=False) 479 | parser.add_argument('-train_obj', 480 | '--train_obj', 481 | default=CONFIG['train_obj'], 482 | type=str, 483 | required=False) 484 | parser.add_argument('-data_path', 485 | '--data_path', 486 | default=CONFIG['data_path'], 487 | type=str, 488 | required=False) 489 | parser.add_argument('-temp_path', 490 | '--temp_path', 491 | default=CONFIG['temp_path'], 492 | type=str, 493 | required=False) 494 | parser.add_argument('-acc_step', 495 | '--accumulation_steps', 496 | default=CONFIG['accumulation_steps'], 497 | type=int, 498 | required=False) 499 | parser.add_argument("--local_rank", 500 | type=int, 501 | default=-1, 502 | help="local_rank for distributed training on gpus") 503 | parser.add_argument("--n_gpu", type=int, default=0, help="gpu per process") 504 | parser.add_argument("--no_cuda", 505 | action="store_true", 506 | help="Whether not to use CUDA when available") 507 | 508 | parser.add_argument('--device', 509 | default='cuda:0', 510 | help='Device used for inference') 511 | args = parser.parse_args() 512 | 513 | if args.local_rank == -1: 514 | device = torch.device("cuda" if torch.cuda.is_available() 515 | and not args.no_cuda else "cpu") 516 | args.n_gpu = 0 if args.no_cuda else torch.cuda.device_count() 517 | else: 518 | torch.cuda.set_device(args.local_rank) 519 | device = torch.device("cuda", args.local_rank) 520 | os.environ["MASTER_ADDR"] = "127.0.0.1" 521 | os.environ["MASTER_PORT"] = "29500" 522 | torch.distributed.init_process_group(backend="nccl") 523 | args.n_gpu = 1 524 | 525 | args.device = device 526 | torch.cuda.set_device(args.local_rank) 527 | logging.basicConfig( 528 | format="%(asctime)s - %(levelname)s - %(name)s - %(message)s", 529 | datefmt="%m/%d/%Y %H:%M:%S", 530 | level=logging.INFO if args.local_rank in [-1, 0] else logging.WARN, 531 | ) 532 | logger.warning( 533 | "Process rank: %s, device: %s, n_gpu: %s, distributed training: %s", 534 | args.local_rank, 535 | device, 536 | args.n_gpu, 537 | bool(args.local_rank != -1), 538 | ) 539 | 540 | set_seed(args.seed) 541 | args_dict = vars(args) 542 | for k, v in args_dict.items(): 543 | CONFIG[k] = v 544 | 545 | if CONFIG['temp_path'] == '': 546 | if args.local_rank in [-1]: 547 | os.makedirs('/test/diyi/temp', exist_ok=True) 548 | temp_path = tempfile.mkdtemp(dir='/test/diyi/temp') 549 | else: 550 | temp_path = '/test/diyi/temp' 551 | CONFIG['temp_path'] = temp_path 552 | CONFIG['emotion_vocab'] = CONFIG['temp_path'] + '/vocabs/emotion_vocab.pkl' 553 | 554 | if args.local_rank in [-1, 0]: 555 | os.makedirs(CONFIG['temp_path'], exist_ok=True) 556 | os.makedirs(os.path.join(CONFIG['temp_path'], 'vocabs'), exist_ok=True) 557 | os.makedirs(os.path.join(CONFIG['temp_path'], 'models'), exist_ok=True) 558 | os.makedirs(os.path.join(CONFIG['temp_path'], 'temp'), exist_ok=True) 559 | os.makedirs(os.path.join(CONFIG['temp_path'], 'centers'), 560 | exist_ok=True) 561 | os.makedirs(os.path.join(CONFIG['temp_path'], 'cluster_results'), 562 | exist_ok=True) 563 | 564 | 565 | if args.task_name == 'meld': 566 | CONFIG['data_path'] = './MELD' 567 | CONFIG['num_classes'] = 7 568 | train_data_path = os.path.join(CONFIG['data_path'], 'train_sent_emo.csv') 569 | test_data_path = os.path.join(CONFIG['data_path'], 'test_sent_emo.csv') 570 | dev_data_path = os.path.join(CONFIG['data_path'], 'dev_sent_emo.csv') 571 | get_meld_vocabs([train_data_path, dev_data_path, test_data_path]) 572 | dev_dialogues = load_meld_turn(dev_data_path) 573 | test_dialogues = load_meld_turn(test_data_path) 574 | train_dialogues = load_meld_turn(train_data_path) 575 | 576 | 577 | if args.task_name == 'emorynlp': 578 | CONFIG['data_path'] = './emorynlp' 579 | CONFIG['num_classes'] = 7 580 | train_data_path = os.path.join(CONFIG['data_path'], 581 | 'emotion-detection-trn.json') 582 | test_data_path = os.path.join(CONFIG['data_path'], 583 | 'emotion-detection-tst.json') 584 | dev_data_path = os.path.join(CONFIG['data_path'], 'emotion-detection-dev.json') 585 | get_emorynlp_vocabs([train_data_path, dev_data_path, test_data_path]) 586 | dev_dialogues = load_emorynlp_turn(dev_data_path) 587 | test_dialogues = load_emorynlp_turn(test_data_path) 588 | train_dialogues = load_emorynlp_turn(train_data_path) 589 | 590 | 591 | if args.task_name =='iemocap': 592 | CONFIG['data_path'] = './IEMOCAP' 593 | CONFIG['num_classes'] = 6 594 | train_data_path = os.path.join(CONFIG['data_path'], 'train_data.json') 595 | test_data_path = os.path.join(CONFIG['data_path'], 'test_data.json') 596 | dev_data_path = os.path.join(CONFIG['data_path'], 'dev_data.json') 597 | get_iemocap_vocabs([train_data_path, dev_data_path, test_data_path]) 598 | dev_dialogues = load_iemocap_turn(dev_data_path) 599 | test_dialogues = load_iemocap_turn(test_data_path) 600 | train_dialogues = load_iemocap_turn(train_data_path) 601 | 602 | 603 | 604 | if CONFIG['local_rank'] != -1: 605 | torch.distributed.barrier() 606 | 607 | model = CLModel(CONFIG) 608 | 609 | if CONFIG['local_rank'] != -1: 610 | model = torch.nn.SyncBatchNorm.convert_sync_batchnorm(model) 611 | 612 | model.to(args.device) 613 | if args.local_rank in [-1, 0]: 614 | print('---config---') 615 | for k, v in CONFIG.items(): 616 | print(k, '\t\t\t', v, flush=True) 617 | 618 | if args.finetune: 619 | model, centers, centers_mask = load_latest() 620 | if args.train: 621 | train(model, train_dialogues, dev_dialogues, test_dialogues) 622 | if args.test: 623 | if args.task_name == 'emorynlp': 624 | test_dialogues = load_emorynlp_turn(test_data_path) 625 | if args.task_name == 'meld': 626 | test_dialogues = load_meld_turn(test_data_path) 627 | testset = build_dataset(test_dialogues) 628 | best_f1 = test(model, testset, centers, centers_mask) 629 | print(best_f1) 630 | -------------------------------------------------------------------------------- /util_methods.py: -------------------------------------------------------------------------------- 1 | from config import * 2 | 3 | 4 | def gen_all_reps(model, data): 5 | model.eval() 6 | ''' 7 | 获取当前模型下所有样本的表示以及对应标签,用这里的输出去做聚类 8 | ''' 9 | results = [] 10 | label_results = [] 11 | 12 | sampler = SequentialSampler(data) 13 | dataloader = DataLoader( 14 | data, 15 | batch_size=CONFIG['batch_size'], 16 | sampler=sampler, 17 | num_workers=0 # multiprocessing.cpu_count() 18 | ) 19 | inner_model = model.module if hasattr(model, 'module') else model 20 | tq_train = tqdm(total=len(dataloader), position=1) 21 | tq_train.set_description("generate representations for all data") 22 | with torch.no_grad(): 23 | for batch_id, batch_data in enumerate(dataloader): 24 | batch_data = [x.to(inner_model.device()) for x in batch_data] 25 | sentences = batch_data[0] 26 | emotion_idxs = batch_data[1] 27 | 28 | outputs = inner_model.gen_f_reps(sentences) 29 | outputs = outputs.reshape(-1, outputs.shape[-1]) 30 | for idx, label in enumerate(emotion_idxs.reshape(-1)): 31 | if label < 0: 32 | continue 33 | results.append(outputs[idx]) 34 | label_results.append(label) 35 | tq_train.update() 36 | tq_train.close() 37 | dim = results[0].shape[-1] 38 | 39 | results = torch.stack(results, 0).reshape(-1, dim) 40 | label_results = torch.stack(label_results, 0).reshape(-1) 41 | 42 | return results, label_results 43 | 44 | 45 | def cluster(reps, labels, init_centers=None, init_centers_mask=None, epoch=0): 46 | 47 | label_space = {} 48 | label_space_dataid = {} 49 | centers = [] 50 | for idx in range(CONFIG['num_classes']): 51 | label_space[idx] = [] 52 | label_space_dataid[idx] = [] 53 | for idx, turn_reps in enumerate(reps): 54 | emotion_label = labels[idx].item() 55 | if emotion_label < 0: 56 | continue 57 | label_space[emotion_label].append(turn_reps) 58 | label_space_dataid[emotion_label].append(idx) 59 | # clustering for each emotion class 60 | dim = label_space[0][0].shape[-1] 61 | 62 | max_num_clusters = 0 63 | cluster2dataid = {} 64 | cluster2classid = {} 65 | total_clusters = 0 66 | all_centers = [] 67 | for emotion_label in range(CONFIG['num_classes']): 68 | 69 | x = torch.stack(label_space[emotion_label], 0).reshape(-1, dim) 70 | # if init_centers is not None and init_centers_mask is not None: 71 | # init = init_centers[ 72 | # emotion_label, :init_centers_mask[emotion_label].sum(), :] 73 | # else: 74 | # init = [] 75 | # kmeans_pytorch 76 | # num_clusters = x.shape[0] // CONFIG['avg_cluster_size'] 77 | # if num_clusters > 1: 78 | # flag = True 79 | # while flag and num_clusters > 1: 80 | # flag = False 81 | # cluster_idxs, cluster_centers = kmeans( 82 | # X=x, 83 | # num_clusters=num_clusters, 84 | # cluster_centers=[], 85 | # distance=CONFIG['dist_func'], 86 | # device=torch.device('cpu'), 87 | # tqdm_flag=False, 88 | # ) 89 | # for c_idx in range(num_clusters): 90 | # c_size = (cluster_idxs == c_idx).sum() 91 | # if c_size < CONFIG['avg_cluster_size']//2: 92 | # flag = True 93 | # num_clusters -= 1 94 | # logging.info('decrease num_cluster') 95 | # if num_clusters <= 1: 96 | num_clusters = 1 97 | cluster_idxs = torch.zeros(x.shape[0]).long() 98 | cluster_centers = x.mean(0).unsqueeze(0).cpu() 99 | logging.info('{} clusters for emotion {}'.format(num_clusters, emotion_label)) 100 | centers.append(cluster_centers) 101 | 102 | max_num_clusters = max(num_clusters, max_num_clusters) 103 | # 记录聚类中心到数据索引的映射,由此来构造对比学习的样本 104 | cluster_idxs += total_clusters 105 | for d_idx, c_idx in enumerate(cluster_idxs.numpy().tolist()): 106 | if c_idx < 0: 107 | continue 108 | if cluster2dataid.get(c_idx) is None: 109 | cluster2dataid[c_idx] = [] 110 | cluster2classid[c_idx] = emotion_label 111 | cluster2dataid[c_idx].append( 112 | label_space_dataid[emotion_label][d_idx]) 113 | total_clusters += num_clusters 114 | for c_idx in range(num_clusters): 115 | all_centers.append(cluster_centers[c_idx, :]) 116 | 117 | centers_mask = [] 118 | for emotion_label in range(CONFIG['num_classes']): 119 | num_clusters, dim = centers[emotion_label].shape[0], centers[ 120 | emotion_label].shape[-1] 121 | centers_mask.append(torch.zeros(max_num_clusters)) 122 | centers_mask[emotion_label][:num_clusters] = 1 123 | centers[emotion_label] = torch.cat( 124 | (centers[emotion_label], 125 | torch.ones(max_num_clusters - num_clusters, dim)), 0) 126 | centers = torch.stack(centers, 0).to(CONFIG['device']) 127 | centers_mask = torch.stack(centers_mask, 0).to(CONFIG['device']) 128 | return centers, centers_mask, cluster2dataid, cluster2classid, all_centers 129 | 130 | 131 | def plot_data(reps, labels, epoch, selection=None): 132 | 133 | emotion_vocab = vocab.Vocab.from_dict(torch.load(CONFIG['emotion_vocab'])) 134 | plt.figure(figsize=(32, 16)) 135 | tsne = TSNE(n_components=2, learning_rate='auto', init='pca') 136 | tsne_res = tsne.fit_transform(reps.cpu().numpy()) 137 | for emotion_label in range(CONFIG['num_classes']): 138 | idxs = (labels == emotion_label).long().cpu() 139 | num_data = idxs.sum() 140 | idxs = torch.argsort(idxs)[-num_data:] 141 | plt.subplot(1,2,1) 142 | plt.scatter(tsne_res[idxs, 0], 143 | tsne_res[idxs, 1], 144 | label=emotion_vocab.index2word(emotion_label), s=100) 145 | plt.subplot(1,2,2) 146 | plt.scatter(tsne_res[idxs, 0], 147 | tsne_res[idxs, 1], 148 | label=emotion_vocab.index2word(emotion_label), s=100) 149 | 150 | if selection is not None: 151 | plt.subplot(1,2,2) 152 | plt.scatter( 153 | tsne_res[selection, 0], 154 | tsne_res[selection, 1], 155 | label='selection', 156 | s=100 157 | ) 158 | plt.legend() 159 | plt.savefig(CONFIG['temp_path'] + '/cluster_results/{}_cluster.jpg'.format(epoch)) 160 | plt.close() 161 | 162 | def get_kth(rows, ratio=CONFIG['ratio']): 163 | num_data = rows.shape[-1] 164 | num_used = (rows==0).sum().item() 165 | if num_data == num_used: 166 | return -1, -1 167 | kth = max(1, int((num_data - num_used) * ratio)) 168 | return torch.kthvalue(rows, kth) 169 | 170 | 171 | def selection(reps, all_centers, cluster2dataid, selection_ratio): 172 | 173 | total_cluster = len(all_centers) 174 | data2clusterid = {} 175 | for c_idx in range(total_cluster): 176 | for data_id in cluster2dataid[c_idx]: 177 | data2clusterid[data_id] = c_idx 178 | all_centers = torch.stack(all_centers, 0).to(reps.device) 179 | # difficult measure function 180 | dis_scores = [] 181 | for idx, rep in enumerate(reps): 182 | self_center = all_centers[data2clusterid[idx]] 183 | self_dis = dist(rep, self_center) 184 | sum_dis = dist( 185 | rep.unsqueeze(0).expand_as(all_centers), 186 | all_centers 187 | ) 188 | dis_scores.append(self_dis/sum_dis.sum()) 189 | dis_scores = torch.FloatTensor(dis_scores) 190 | priority_seq = torch.argsort(dis_scores, descending=False).cpu().numpy().tolist() 191 | 192 | num_selection = int(selection_ratio * len(priority_seq)) 193 | select_data_idx = priority_seq[:num_selection] 194 | 195 | return select_data_idx 196 | def gen_cl_data(reps, 197 | all_centers, 198 | cluster2dataid, 199 | cluster2classid, 200 | epoch=0): 201 | 202 | batch_size = CONFIG['batch_size'] 203 | num_data = reps.shape[0] 204 | dim = reps.shape[-1] 205 | total_cluster = len(all_centers) 206 | 207 | cluster_idxs = torch.zeros(num_data).long() 208 | labels = torch.zeros(num_data).long() 209 | 210 | for c_idx in range(total_cluster): 211 | for data_id in cluster2dataid[c_idx]: 212 | cluster_idxs[data_id] = c_idx 213 | labels[data_id] = cluster2classid[c_idx] 214 | seed_list = selection(reps, all_centers, cluster2dataid, CONFIG['ratio']) 215 | # plot_data(reps, labels, epoch, seed_list) 216 | return seed_list, cluster_idxs --------------------------------------------------------------------------------