diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f603810 Binary files /dev/null and b/.DS_Store differ diff --git a/HOPE_data/.DS_Store b/HOPE_data/.DS_Store new file mode 100644 index 0000000..1a5f072 Binary files /dev/null and b/HOPE_data/.DS_Store differ diff --git a/HOPE_data/HOPE_data_source/URL_sources.txt b/HOPE_data/HOPE_data_source/URL_sources.txt new file mode 100644 index 0000000..bab49fe --- /dev/null +++ b/HOPE_data/HOPE_data_source/URL_sources.txt @@ -0,0 +1,348 @@ +https://youtu.be/ihDezGfSvQs +https://youtu.be/jKIFMKsPMas +https://youtu.be/9om2tedf9oo +https://youtu.be/FQOrzyBuAi8 +https://youtu.be/88qr91P1lsA +https://youtu.be/Na11PJGFokQ +https://youtu.be/s6UW9b6zncc +https://youtu.be/QpIV2Zqf8F0 +https://youtu.be/rmjBUBlFfU8 +https://youtu.be/rGyA5IgmzuM +https://youtu.be/okzklwP7zoo +https://youtu.be/ZNDBInn5neE +https://youtu.be/fSWXiFJybSg +https://youtu.be/P7qMfG-yNfA +https://youtu.be/sW5HDbm09ZE +https://youtu.be/Xj2FB047sVc +https://youtu.be/qe-0fk4ZG20 +https://youtu.be/fK70IxJ4nP0 +https://youtu.be/yqJkupJitaU +https://youtu.be/_-WX9kQMXss +https://youtu.be/yALqWoumUw4 +https://youtu.be/jDyu_uTHVGw +https://youtu.be/_gAX6CCfckM +https://youtu.be/ZD-QoQ0ivKc +https://youtu.be/FduIvOiyga0 +https://youtu.be/ZgZENqjIiyo +https://youtu.be/I1F4hvfRC50 +https://youtu.be/Dl9SEZvKR4M +https://youtu.be/fVpPZUEg9s4 +https://youtu.be/3374lbYdGqk +https://youtu.be/VQD12PPjFrU +https://youtu.be/o6JjYHUKSPs +https://youtu.be/czzQ7fIQE84 +https://youtu.be/deXcodYegDA +https://youtu.be/cTIDnMLr0gk +https://youtu.be/rKTYOAI65zE +https://youtu.be/bxbSsK5D_PY +https://youtu.be/9cYeZdKeXsc +https://youtu.be/Bub8YLl1fUI +https://youtu.be/C4kdF-3btbg +https://youtu.be/Q_kYJ63RUAA +https://youtu.be/Ac0aZgha6Fk +https://youtu.be/jS1KE3_Pqlc +https://youtu.be/rRze7Na1MXg +https://youtu.be/KuHLL2AE-SE +https://youtu.be/-tbKuW6k1cE +https://youtu.be/U6VzVpsqG40 +https://youtu.be/DcAqhHb5-hk +https://youtu.be/G40ywooLnns +https://youtu.be/tq_yyMVax_c +https://youtu.be/AOkVH-8zn5A +https://youtu.be/vdMnsJJvqR4 +https://youtu.be/uriVBFB1oOI +https://youtu.be/x0Iky4NWN2U +https://youtu.be/JFrT8NOXeHk +https://youtu.be/Dm5w8aCM5cw +https://youtu.be/mfe8OzzArGc +https://youtu.be/8N1PzEFw0oE +https://youtu.be/dJ1eDL15_Lw +https://youtu.be/Rz9U3hXZn1c +https://youtu.be/w8Jo2xdxLXo +https://youtu.be/pllei-yDO8c +https://youtu.be/XbYGdo9lMsQ +https://youtu.be/V9G2wt5vvdw +https://youtu.be/vzhBWkQXaB8 +https://youtu.be/8K4HW6_MvoU +https://youtu.be/TcewFGydzPM +https://youtu.be/o2Cv6Mlp3KY +https://youtu.be/LuuKIF4-F_Q +https://youtu.be/jmwQ3SE6Uew +https://youtu.be/gbBn8EzZx3w +https://youtu.be/XUVQ5dGB1x0 +https://youtu.be/ZAOwjnqVUnM +https://youtu.be/9i_qh-BAWTw +https://youtu.be/sErapRr-Na0 +https://youtu.be/_gPcDRVALVo +https://youtu.be/Um_VnB43rLw +https://youtu.be/WdWtfuPD4As +https://youtu.be/jm6PG989Q_0 +https://youtu.be/qbamiDqWjjg +https://youtu.be/E9mZ3915tdU +https://youtu.be/uMeAjA2Edis +https://youtu.be/PZi1Vl2p8xw +https://youtu.be/wNF1FIKHKEU +https://youtu.be/hjI-MRpv7PM +https://youtu.be/drTeoerWtKU +https://youtu.be/q4x4KHDiJAs +https://youtu.be/0Xkd2WNtvI4 +https://youtu.be/la5VCuaPi2w +https://youtu.be/P624_q04ZWg +https://youtu.be/UxCT6zVPk7A +https://youtu.be/q58A-IM8iUs +https://youtu.be/-fLArKnlQkw +https://youtu.be/f6Y_P8Jv2cU +https://youtu.be/km_ZGAVsr20 +https://youtu.be/dbqFCbXxwb0 +https://youtu.be/7FLBpiEEedg +https://youtu.be/GHi-ut-gfgs +https://youtu.be/Ad1E-Wi-DzM +https://youtu.be/EbomaV3F8H0 +https://youtu.be/UAIr_NlZbak +https://youtu.be/Q5sYESOumQY +https://youtu.be/BYbCvD_8QYE +https://youtu.be/cgfs3h6Ahe8 +https://youtu.be/UkjjYbFBctk +https://youtu.be/jkKm5Cym-ZY +https://youtu.be/Gt1dCRfv_Lc +https://youtu.be/VllviqjGYpw +https://youtu.be/cVvMUM6fFWk +https://youtu.be/z60HLGvT7DQ +https://youtu.be/82YC8jm6x-Q +https://youtu.be/J2dpGjs5mjA +https://youtu.be/4AteX7MS03k +https://youtu.be/HIgQKH3Y1VE +https://youtu.be/zTvFhaDP0bM +https://youtu.be/aTtmXde5T_Q +https://youtu.be/0Dz9MYAyJGc +https://youtu.be/OhHauJSOPMY +https://youtu.be/FYwSVpGOd3g +https://youtu.be/syM6XYzht20 +https://youtu.be/HKJXCj1xPH0 +https://youtu.be/liJPBeFbJ3Q +https://youtu.be/tlQHg2Rbm60 +https://youtu.be/VXJy0X0OZtI +https://youtu.be/JTcjMPoxUTM +https://youtu.be/44mIo53rx3A +https://youtu.be/7Ibb68uVXEg +https://youtu.be/PK-Sq7I7M54 +https://youtu.be/zyIN61kQ6VY +https://youtu.be/4Y3EGPjhiXE +https://youtu.be/8-0VGan6sCY +https://youtu.be/c6SDiismjkM +https://youtu.be/H8CJxNP0nv8 +https://youtu.be/EtVJr05akR4 +https://youtu.be/wl0zc9pPJb4 +https://youtu.be/X4OEhMWbSss +https://youtu.be/ExNs8o8A4fI +https://youtu.be/X7o-_2Ityd0 +https://youtu.be/8E7e7-LD7pw +https://youtu.be/yYC4y7KuELY +https://youtu.be/A1XJeciqyL8 +https://youtu.be/RybY4zIecQ4 +https://youtu.be/64T_BwKcc2M +https://youtu.be/dREjjXvFybk +https://youtu.be/S4jJ_AZhxgU +https://youtu.be/Yv9QS8KJnDE +https://youtu.be/ylWpUUqP1Hg +https://youtu.be/OPCYGqzf7Us +https://youtu.be/z9fF9F5w1cI +https://youtu.be/W3hMmZQAdhw +https://youtu.be/_H6w9Of_vPA +https://youtu.be/7_gmIvbjt3w +https://youtu.be/YYh9WOOxrOo +https://youtu.be/0cGGCuFWMtw +https://youtu.be/YKDQ6mU4V6k +https://youtu.be/SD_flKS7koQ +https://youtu.be/k_78UKFERGE +https://youtu.be/jlXmVqhaMds +https://youtu.be/tBd5VGCKnjA +https://youtu.be/Xj3q96mCfC8 +https://youtu.be/ankWMLepQsE +https://youtu.be/VKdjQYtbiic +https://youtu.be/3ydZbOjDZ70 +https://youtu.be/pmhFLPA1fhg +https://youtu.be/cwmf4PSMqLE +https://youtu.be/7De6VY8P9hY +https://youtu.be/L1vluZ9uHMY +https://youtu.be/W_tDRu67JnI +https://youtu.be/YkKrNy_J_O4 +https://youtu.be/VGdWk7YRS1c +https://youtu.be/ZSDJymlMOxg +https://youtu.be/vRBXYm3KuJU +https://youtu.be/YJflzedS_DU +https://youtu.be/iJGWhR7c2Ik +https://youtu.be/_qYgF_e4EQQ +https://youtu.be/nblFvpbetoE +https://youtu.be/LmB3ZQ2F1MY +https://youtu.be/228-r0WGizM +https://youtu.be/pvTGgLtVDNU +https://youtu.be/RsI7Iycy5H4 +https://youtu.be/L4oDAYZWLhs +https://youtu.be/DPOFpRQqInw +https://youtu.be/EbdMiNRaZJg +https://youtu.be/1jfH055byg4 +https://youtu.be/SNstOn6owcI +https://youtu.be/yFcqj_ml8dc +https://youtu.be/TMVRjab1TmE +https://youtu.be/6Hcebt_wBVw +https://youtu.be/sDrakgSYvzc +https://youtu.be/YpgvoXv3o-w +https://youtu.be/S4wWClQhZaA +https://youtu.be/nanU4vR993I +https://youtu.be/HQWorEVFjUo +https://youtu.be/ciaoqPxyD_Q +https://youtu.be/XUuWWoQTlww +https://youtu.be/CdyJ0iB_k00 +https://youtu.be/wSrpYVszdms +https://youtu.be/25jUW52zAvU +https://youtu.be/GCoCq2o6Ye8 +https://youtu.be/X9NBaihCzhk +https://youtu.be/v21ZLg8n8do +https://youtu.be/Q9astgtdDW4 +https://youtu.be/_TwVa4utpII +https://youtu.be/Wx8F9uwQTnY +https://youtu.be/PhiB_aVj1VM +https://youtu.be/CGtxBQgepSs +https://youtu.be/st_FaCl3NCY +https://youtu.be/P2a9102jifM +https://youtu.be/Ch9YNaCgBU4 +https://youtu.be/_dDs-XgpjP8 +https://youtu.be/ehOfVBLWilw +https://youtu.be/hX8e5UM7WlQ +https://youtu.be/Zldp0jcw6j4 +https://youtu.be/MtcWc8IzaWg +https://youtu.be/S7RlcWtlzSI +https://youtu.be/yNqaUMiU0Dk +https://youtu.be/Qwbm0s5970M +https://youtu.be/BsnCtj2kwv4 +https://youtu.be/nYk8Xs7Qee4 +https://youtu.be/jxNBQKMW1wg +https://youtu.be/lrnkEQRUyJM +https://youtu.be/P3JUXQ4kkHs +https://youtu.be/mpE-oaix5kA +https://youtu.be/kuhImFdGW_w +https://youtu.be/BHEDnTntb0I +https://youtu.be/PtCj7ecyHjg +https://youtu.be/EO9F6b1R-ws +https://youtu.be/_pkXuC7vsl0 +https://youtu.be/MAw3yh4BgQE +https://youtu.be/xu0orOMQpCk +https://youtu.be/hOcPKXJmEdU +https://youtu.be/Q08YjIJ8NYI +https://youtu.be/RMvHw_RuPPk +https://youtu.be/W5v7GHqvbFE +https://youtu.be/0XEKrRJeB5I +https://youtu.be/4gtDUCVAxxY +https://youtu.be/eqIM3n7ujVA +https://youtu.be/y39BDAljIbg +https://youtu.be/IVNLot-qJGs +https://youtu.be/fEnrXVLNcfk +https://youtu.be/8aDFvvjC6XM +https://youtu.be/osROod3Hmpg +https://youtu.be/KRDH89uP8wI +https://youtu.be/IWKseYFhp1Y +https://youtu.be/JKUFWK6iSsw +https://youtu.be/u7m6iCAf3hY +https://youtu.be/7xFAWq5WQRI +https://youtu.be/iRqY5UddPNo +https://youtu.be/bTRRNWrwRCo +https://youtu.be/Hiw4OHuwU48 +https://youtu.be/XH2tF8oB3cw +https://youtu.be/q7Idcbbpbqc +https://youtu.be/7LD8iC4NqXM +https://youtu.be/o6AdcHbVujg +https://youtu.be/eIDhKWAsWuY +https://youtu.be/xkbEtIr08JU +https://youtu.be/z8L5Nwa0nxc +https://youtu.be/oWMNskk8nzY +https://youtu.be/wkQS_NWleMU +https://youtu.be/Zwsl7zsS7cw +https://youtu.be/MzoeBJyVlE0 +https://youtu.be/dUwN6GI-0EQ +https://youtu.be/keSGvlBzQWg +https://youtu.be/_HIotEzcUEU +https://youtu.be/nkWrkwPDxvw +https://youtu.be/F-zT2tj53NY +https://youtu.be/SSJFJpk0osU +https://youtu.be/N8iqH9qwIAQ +https://youtu.be/Kusv2J0M19E +https://youtu.be/mZc43xBB3qk +https://youtu.be/ZJQgSGp18Mc +https://youtu.be/pGhtido14gk +https://youtu.be/w8namZ5rt2k +https://youtu.be/ofnnuwscA1Y +https://youtu.be/iBp75KNuLb8 +https://youtu.be/I7QiPXqL9pY +https://youtu.be/PjHy2v18TaQ +https://youtu.be/92jbfcpiA9Y +https://youtu.be/FsYLmLoPPwk +https://youtu.be/3rSt4KIaN8I +https://youtu.be/Cg4BbnkBavQ +https://youtu.be/Cgut_WRNywo +https://youtu.be/0Q4eXoTvDBc +https://youtu.be/T33j_ZETzUs +https://youtu.be/AJ4Uyf5X6Sw +https://youtu.be/x7HJmVx3qN4 +https://youtu.be/zdsaW_TSzHU +https://youtu.be/Qv6j1H8Tvus +https://youtu.be/58_UJc4XjLo +https://youtu.be/-i4IwA5MZ1c +https://youtu.be/-GaYArbWL1Q +https://youtu.be/8p7vNzCpu2Q +https://youtu.be/oT2iPNcPejA +https://youtu.be/dNfM2ihfSSE +https://youtu.be/21UTRCWbv20 +https://youtu.be/67I6g1I7Zao +https://youtu.be/lJN6g0V5Q-U +https://youtu.be/KpRQvcW2kUM +https://youtu.be/1I-1mu-nm_w +https://youtu.be/7_jj-hBzYnY +https://youtu.be/0b9WEFYrdDk +https://youtu.be/A-m_aIQfXZA +https://youtu.be/P99PqrK775g +https://youtu.be/n17O4_Uy6Vk +https://youtu.be/zdha69z2VaA +https://youtu.be/hUQiq1mou78 +https://youtu.be/w5tsDZtXBlE +https://youtu.be/wYTzxk1g5LI +https://youtu.be/0Ak1EonaL7g +https://youtu.be/Kv2s834dG5c +https://youtu.be/Dfo1wiPkUK0 +https://youtu.be/5UHbkDeYYYY +https://youtu.be/gFVeSopv--w +https://youtu.be/G8atkQwFgPE +https://youtu.be/J7eKv_pW1bk +https://youtu.be/ANs9s7_u8SE +https://youtu.be/DJSTzTdXwWc +https://youtu.be/nFwAiO22g4Y +https://youtu.be/QmFwph3ql3w +https://youtu.be/YuFmc3y72Nw +https://youtu.be/EvLquWI8aqc +https://youtu.be/8mQZzlQXK1Q +https://youtu.be/xaHms5z-yuM +https://youtu.be/NiPQIhbrKFk +https://youtu.be/ufXwxYsVaeA +https://youtu.be/4-bH55MCa1U +https://youtu.be/824H2W-h5Kg +https://youtu.be/ZB28gfSmz1Y +https://youtu.be/zA-fqvC02oM +https://youtu.be/Ii2FHbtVJzc +https://youtu.be/tiuZBndewbE +https://youtu.be/_s1lzxHRO4U +https://youtu.be/IViQKF9qFaw +https://youtu.be/0Tt1IDjmito +https://youtu.be/SNs6yaa9MGk +https://youtu.be/9ZuwEWLHHHY +https://youtu.be/80XyNE89eCs +https://youtu.be/dmmvAR6K1TQ +https://youtu.be/3xrEaFPbYC8 +https://youtu.be/URiKA7CKtfc +https://youtu.be/5UU63mfNnD4 +https://youtu.be/f8QSA_5PEFM +https://youtu.be/dm-rJJPCuTE +https://youtu.be/Gc2Nox6PMnc +https://youtu.be/53waCW9ir-k +https://youtu.be/mT_GgV7z15I +https://youtu.be/PETvBmNlGtg +https://youtu.be/nOQlOWHB-o4 diff --git a/HOPE_data/HOPE_therapy_session_transcripts/163.csv b/HOPE_data/HOPE_therapy_session_transcripts/163.csv new file mode 100644 index 0000000..079675c --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/163.csv @@ -0,0 +1,116 @@ +ID,Type,Utterance,Dialog_Act +163_0,T,"Hey Michelle, how are you doing today?",gt +163_1,P,"Umm I am kind of doing, I'm feeling a little bit stressed out",gt +163_2,T,stressed?,irq +163_3,P,"Yeah, I feel like I have a lot on my plate. I have this test that I have to take for work.",id +163_4,T,What kind of test?,irq +163_5,P,It's like an aptitude test. It has like math problems on it and like scenarios in order for me to move up to the system manager position.,id +163_6,T,"Now, that's a job that you've been interested in for a while.",irq +163_7,P,"Yes. Yes. So I've been just feeling a lot of anxiety about taking the test and then they actually scheduled for me to take the test. And I want and I just got really overwhelmed. And I started like I felt my heart was racing. I felt like I wish my hands were shaking. And I just really couldn't concentrate on the test. Even though the night before me and my friend that practice problems, and I knew all the answers with no proper like, I didn't miss any of the questions",id +163_8,T,so you know the material on this test pretty well?,ynq +163_9,P,yes.,yna +163_10,T,"But the feelings and that the physiological response to heart rate and sweating, that feelings of anxiety plus those physiological responses they got in the way of you completing it, like you were unable to complete it.",gc +163_11,P,"No, I wasn't able to complete it. And thankfully, they gave me a chance to come back. I just told him I didn't feel well. So they rescheduled so now I'm feeling a lot of anxiety because I'm scared the same thing is gonna happe, when I go back.",gc +163_12,T,So you weren't you weren't feeling great about taking the test in the first place?,irq +163_13,P,"Today, the night before, I felt like I know all the answers, but the minute I walked into the room, all of a sudden, all these fears kind of took over. ",id +163_14,T,But did you know that was coming?,ynq +163_15,P,"Yes, ",yna +163_16,T,you did ?Okay.,irq +163_17,P,Yes.,id +163_18,T,So you had some anxiety in advance?,irq +163_19,P,"Yes, ",id +163_20,T,"or no, you did. Okay.",gc +163_21,P,"I had some anxiety the day before. But when I reviewed it with my friend, I'm like, Oh, I know the answers. I thought that would kind of push it down. But I think once I got there, it all came back up to the surface,",id +163_22,T,"erupt in that moment, and that prevented you. What do you think is leading to this?",gc +163_23,P,"Well, I've always kind of struggled with tests. I'm like, I can remember when I was in third grade, I had to take this test, because I was really struggling in math. And I had to pass this test in order to move to the next grade. And I thought just like this test that I was ready for it, I had a tutor, and I felt really prepared for it. And then when I took it, I failed. And I was held back. And I feel like, you know, that was so it was, it was really embarrassing for me to be held back. And I felt like I don't want to say but I did feel like a failure at the time. Because I felt like I really didn't know this. I don't know why I couldn't pass the test.",id +163_24,T,And since that this was third grade.,gc +163_25,P,Yeah.,ack +163_26,T,And since that bad testing experience. Have you had trouble with tests since?,ynq +163_27,P,"Yes, I always feel really anxious. I mean, I'm able to pass tests obviously because I graduated from college. School went on to high school. But it's so hard for me because of this anxiety that I feel that even though I may think I know it, I may still fail the test anyway, maybe like a repeat of what happened.",yna +163_28,T,"Alright, so in third and third grade, you had a really bad testing experience. And as you move forward from there, you've never really been thrilled about taking tests ",irq +163_29,P,no,id +163_30,T,"But you've been able to adapt. You've been able to take them and still, like pass them.",ynq +163_31,P,"Yeah, I mean, sometimes I get an A. ",yna +163_32,T,"So that's, that's good, right? ",irq +163_33,P,"Yeah. I mean, yeah, it is good. Yeah, it's good.",id +163_34,T,"But this particular test, which is not for scorches for work, yeah, this one, this is more of a stumbling block for you.",gc +163_35,P,Yes.,ack +163_36,T,You have any ideas as to what may what may be what may be making this test such a point of anxiety for you?,gc +163_37,P,"I think it's just the fact that it's this promotion. So it's like the same thing. Like, if I fail, I'm being held back. And I feel like it's, we live in that moment of being held back. And that, that that's like a fear that I have that, um, that by not being able to pass these tests are holding me back.",gc +163_38,T,So it really that same feeling you've had in third grade. That's coming up with this test.,irq +163_39,P,"Yeah, I mean, I didn't put them together until now. But yeah.",id +163_40,T,"And the other test you take in throughout the rest of grade school in high school they didn't, they didn't have that same value attached to them.",gc +163_41,P,"Now because they didn't have all that pressure that it was either win win or lose, basically, ",gc +163_42,T,"you could, you could take them again or take the course again or?",irq +163_43,P,or I could take another test to raise the grade if I didn't do good on that.,id +163_44,T,so you have you maybe had more options in school?,ynq +163_45,P,"Yes. Was it fail, you know, pass or fail?",yna +163_46,T,"Right, So it's the, it's the pressure is the pressure of you need to get through this. And you don't have the safety nets that you had in school? ",gc +163_47,P,"Yeah, if I fail it, then I'm not going to be able to get the promotion, I would have to wait. Just like I did not have to wait a certain amount of time. I think an ear before I could take it again.",yna +163_48,T,So this a lot of pressure.,irq +163_49,P,Yeah it is,id +163_50,T,So is there any time limit to this test for work?,irq +163_51,P,"Um, no, there isn't.",id +163_52,T,There's no time.,irq +163_53,P,No,id +163_54,T,"How many Is it like a, like a multiple choice? ",irq +163_55,P,"Yes, it is. ",id +163_56,T,"Okay. And you seem like, like you said, you said the night before with your friend. ",gc +163_57,P,Yeah.,ack +163_58,T,You're really well prepared for it.,gc +163_59,P,Yes.,gc +163_60,T,"So I have a few a few thoughts about this. One is I'm wondering you know, we've talked before about cognitive therapy core beliefs. So I'm curious as to what you think about what core beliefs may be operating. For you now with this with this test, this work test",gc +163_61,P,"that I could fail that if I fail I could end up being a failure at all, you know, the things that I try",gc +163_62,T,"something like, I am a failure or I'm bound to be a failure, I'm destined to be a failure. ",irq +163_63,P,I would say like I'm destined to be.,id +163_64,T,"Okay, so destined to be failure. So that, so that, potentially, is a core belief. Right? That's, that's operating.",gc +163_65,P,"I mean, that's what scares me. That's, that's exactly the thought that I'm thinking when I'm about to take the test. And if I don't pass that, it's just gonna have like this domino effect of failure.",gc +163_66,T,"Okay, so it could be a core belief, but it's also seems like you're still on that thought. Like as you get ready to take that test. You're thinking I'm just destined to be a failure. ",gc +163_67,P,Yeah.,ack +163_68,T,And you're having what sounds like a panic response to heart racing.,irq +163_69,P,"Yeah, my hands shaking. ",id +163_70,T,Are you in the room alone? You're taking the test?,ynq +163_71,P,"Yes, ",yna +163_72,T,you are. So no one's really seeing you have this. I wouldn't want to call it a panic attack yet we haven't really gotten too far into it. But it sounds like it has some panic like features.,gc +163_73,P,Yeah.,gc +163_74,T,"Because it's not. It's interfering with you thinking clearly enough to get to the items. So, okay. So one thought I have is you have you ever had panic attacks in the past or anything like this?, the third grade thing?",gc +163_75,P,"No, not really. I mean, sometimes I get worked out when I'm about to take a test, okay, but it's only around test.",id +163_76,T,And what happens once you get worked up like once your heart rate increases and You have any other physiological symptoms would,irq +163_77,P,want to actually do take the test?,irq +163_78,T,hmmm,id +163_79,P,"Um, I kind of try to work through it and start trying to answer one question at a time to get to the last question.",id +163_80,T,"So one one possible strategy here is we talked about the adaptive response. Right? So, which is that thought that you say to yourself that self talk, I wonder if your doctor response couldn't be I can ride this out like you have no time to test? ",gc +163_81,P,"Yeah, that's true. ",id +163_82,T,"I mean, the panic responses only maintained for so long",gc +163_83,P,and I could also choose like maybe questions that are no the answer to automatically so that could help maybe release some of that stress,gc +163_84,T,"to get some in a sense to get some minor victories under your belt by like, answering those right you know, you're closer to achieving your goal",gc +163_85,P,"yes and then I feel like I know, at least I know that like, Don't validate the feeling that I maybe I can pass this test.",gc +163_86,T,"So the more items you you answer correctly, the less anxious you're gonna feel because you're closer to the end of.",irq +163_87,P,"Yeah, definitely. Because then I start to feel more calm because I know that I know these questions are definitely going to be right.",id +163_88,T,"So that's so that's one well, that's a cognitive and behavioral strategy, right? Like you can you can wait out the panic. I mean, you're in the room alone.",gc +163_89,P,"Yeah, that's true. Nobody's there. Nobody's gonna see me. I'm kind of trying to get myself together. ",gc +163_90,T,"Yeah. Now the panic painful. Right, the you know, the panic symptoms are painful. So what you could tell yourself is, this isn't pleasant. But I can write out these symptoms because they only last so long. ",irq +163_91,P,"Probabiy, I could use like self talk. ",id +163_92,T,"Exactly. Yeah, because usually mean peg symptoms can run you know, five minutes. 10 minutes, 15 minutes. But you have no time limit? ",gc +163_93,P,"Yeah,",id +163_94,T,"yeah so if you can just kind of use that time to focus on the items, as you mentioned, you could get right. And kind of, at the same time be telling yourself I can ride this out.",gc +163_95,P,"Yeah, I mean, I've done that in the past, so I can apply it to this test. ",id +163_96,T,So if that's worked for you that ?,irq +163_97,P,"yes, that has worked and I passed. ",id +163_98,T,"So that's, that's certainly that's certainly one adaptive response to try writing. Another one could be that, although it wouldn't be great to fail, you can retake the test in a year. Right. You could try it. ",gc +163_99,P,"Yeah, that's true.",gc +163_100,T,"I mean, I know that's not what you want, but, but the alternative is kind of buying into that automatic thought we know that's not working. Right. The I'm I'm Destin, that was the word right like I'm destined to be a failure. We know that's not working for you. ",gc +163_101,P,"So even if I have to take the test again and in a year, then I'm not going to be a failure because I still have the chance to take it again. It's not like I'll never be able to take this test again.",gc +163_102,T,"Yeah, you just have, you just have another years of study, right? And, of course, you wouldn't have that promotion that time and that would be an outcome, I know you don't want. But it's not the end of your career, It's not like something so drastic it's important to you and I can appreciate that. But it's not the end of your career. You're not going to be unemployed.",gc +163_103,P,"No, no, definitely not. And just thinking back and relating it back to the third grade, even though I had to stay back. I still managed to, you know, do well the next year and keep moving up. And it hasn't really, in the long run prevented me from doing anything that I've wanted to do.",gc +163_104,T,"So that's great. That's another adaptive response, which you've survived this before.",gc +163_105,P,"Yes, I definitely have.",gc +163_106,T,"So this one event, I mean, I had the the incident third grade with the unpleasant experience but this one event you don't want that this kind of fashion. While use your word, your destiny by like this was one that seemed to catch you off guard but the the panic like symptoms. And fortunately your employer is going to give you the chance to retake and try this again. And, and I met you know, so you have I imagine you could you can write out these, these symptoms. And I think you have the other adaptive response, which is I've been successful this before.",gc +163_107,P,"Yeah. I mean, definitely I feel a lot better now because I just know that no matter what happens, I've been here before, and I can get through it as opposed to like that feeling that I'm going to just fail together.",gc +163_108,T,"Oh, it's so good, when you have to take the test?",irq +163_109,P,on next week.,id +163_110,T,So let's schedule one more appointment right before that.,gc +163_111,P,"Okay, right. ",gc +163_112,T,"And we'll, we'll make sure that you have these adaptive responses down and you're ready to go. Okay. And really will kind of focus on the positive outcome. Right. Okay, which is just taking this test taking one item at a time and fighting through some of these physical symptoms you're having, and fighting through the useful thoughts.",gc +163_113,P,"Okay. Yeah, I mean, that sounds good. That helped me prepare for the test. ",gc +163_114,T,"Great. So, Michelle, I'll see you. I'll see you then and work through it. I really appreciate you coming in today.",gc diff --git a/HOPE_data/HOPE_therapy_session_transcripts/204.csv b/HOPE_data/HOPE_therapy_session_transcripts/204.csv new file mode 100644 index 0000000..834b056 --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/204.csv @@ -0,0 +1,49 @@ +ID,Type,Utterance,Dialog_Act +204_0,T,"Hi Miss Clark, My name is Alan Lime. I'm a social worker at the Family Health Center. Dr. Steele asked me if I would spend some time with you today. I'm really glad that you're here. I'm just curious as to why he would send you to me.",gt +204_1,P,"Well, I came to see Dr. Seal last week because of increasing stress and anxiety, that's kind of getting the best of me. And in the course of my appointment with him, he was asking how I was dealing with that stress. And I mentioned that my one or two glasses of wine a few nights a week is turning into more frequent and maybe three or four on some nights and he had some concerns about that and, and felt like maybe you could help me with stress or something.",gt +204_2,T,"Yeah. So he, he actually see me because you went to him for increased stress. And he's concerned that your alcohol consumption may be a part of that increase And prior to prescribing anything, you want to make sure that you at least had someone to talk to that",gc +204_3,P,I suppose.,gc +204_4,T,Okay. So you filled in one of the Pink Sheets and I take a look at that.,irq +204_5,P,He told me to fill that out and bring it with me.,id +204_6,T,"Okay, thank you. So, you say here that you have four or more drinks in one week, you mentioned that you may be increasing that a little bit as well. And that you have one or two drinks in one setting ",irq +204_7,P,"typically, yeah. ",id +204_8,T,And maybe monthly you have more than that. What what's what kind of drinks do you have? What do you do when you typically drink,irq +204_9,P,"wine with my meals? You know, again, one or two, typically and more frequently, three or four. My stress is increased.",id +204_10,T,"So it's time to increase your strength a little more. Well, based on what you put here, you get it gives you six points on this scale scale ranging from zero to 46 points will put you in what we would consider an at risk zone. So if it's okay with you to talk a little bit about that,",id +204_11,P,okay,ack +204_12,T,"okay. So that was sunset run zero to 40. It's not a sort of super high risk, but it certainly could be a risk for maybe increasing stress might be some physical ailments related to alcohol as well could could start to show up if you were to increase your drinking from there, or even stay there. This is a typical standard drink size over here, I'm not sure whether that fits your description of a glass of wine or not,",irq +204_13,P,I feel the glass up so maybe a little more than that,id +204_14,T,"maybe the little space it's upset, perhaps a drink drink and a half each one. So that also increased a little bit more. So perhaps maybe drinking more than you indicated on here. And for women, healthy woman your age, no more than three drinks in one setting is considered to be low or no risk and one seven in one week, seven total in total a week and what you say here is that even on this sheet, you're perhaps already drinking more than that. So what do you make of all that?",irq +204_15,P,"That news to me, you know, I thought red wine with your meals is supposed to be healthy. You know, no more than seven in a week? That seems kind of prohibitive?",id +204_16,T,"Yeah, it seems seems a little less than perhaps you've been drinking or what you consider to be healthy drinking. And certainly there's there's conflicting information out there about what's healthy and what's not healthy. Imagine the increased stress work because we're concerned doctor seal as your stress increases, and if you were to describe you anything, maybe some interaction between the two, that would also be a concern for him. I would, I would think, so if you would, what is it that you like about alcohol?",irq +204_17,P,"Well, you know, it does, at least in the moment, temporarily reduce my stress. And I you know, like a good glass of wine. I don't don't drink the cheap stuff. I like the expensive.",id +204_18,T,"See, like the taste of it. And it does help to lower the stress, even if it's just for the fun of me drinking. What's not so good things about alcohol for you.",irq +204_19,P,"Um, well, you know, the nights that maybe I have a couple more glasses than I should I wake up feeling kinda yaak and, of course, part of my stress is finances. And I mentioned I like the good stuff. And so if I'm drinking more than I'm increasing my financial burden,",yna +204_20,T,your financial stress may be increased by the fact that you're drinking.,id +204_21,P,"Yeah, kind of defeating the purpose they're",gc +204_22,T," the drink introduce stress and increasing stress at the same time. So on the one hand, it low is it on the other hand, it's increasing kind of the seesaw teeter totter effect. What do you make of that, given that on one hand, it lowers on the other hand, it increases and and now it's increasing even more?",irq +204_23,P,And maybe I need to find some other way to deal with my stress. Yeah.,id +204_24,T,Imagine investment thoughts so that what have you thought of trying?,irq +204_25,P,"Well, I've exercised in the past and that helps. Right now. My schedule is kind of out of whack and I just really don't know what to do. That's why I came to see Dr. seal. I thought maybe he can prescribe me something that would help. You know, when I'm feeling overwhelmed,",id +204_26,T,"And he may be able to I'm not saying that he cannot just imagine that he's concerned that if you continue to drink, the level that you are drinking, that whatever he prescribes you, there may be an interaction with it to mention that he's concerned. I'm not completely sure. So you've had some success in the past of changing behaviors. And if you were to decide to make any changes here that sounds like you could draw upon that to make those changes. How important would it be for you on a scale of zero to 10? I have a low visual hero that if zero is not important, ten is very important to do something about your drinking wine.",irq +204_27,P,"Well, I mean, if if it means that it's increasing my stress and or he's not going to prescribe me anything because of my drinking, then it's fairly important, maybe about seven. ",id +204_28,T,It's it's pretty up there. What do you choose a seven out of five or four?,irq +204_29,P,"Well, again, I got to get things under control. You know, My kids are dependent on me and I've got to go to work to help ease this financial stress. And so, you know, all those responsibilities",id +204_30,T,there's a lot riding on your decision on what to do with this. What if anything would bring up to an eight or nine on that scale?,irq +204_31,P,"Well, the you know, the risk that you mentioned about the drug interaction, I certainly can't afford to, you know, have any more stress. So, yeah, ",id +204_32,T,so so you you choose to lower your stress rather than increase it. And if lowering your drinking would have that effect that something be willing to do.,ynq +204_33,P,hmmm,ack +204_34,T,How confident are you that you could do something about your drinking?,irq +204_35,P,"I'm pretty confident and you know, probably about a seven or an eight ",id +204_36,T,"Okay, so it's pretty high up there again, and what if, what if anything, would you choose to do would it be to cut down would it be to quit? I'm just curious about that",irq +204_37,P,"I you know, I like a lot A glass of wine, I don't want to quit altogether, I'd be willing to try cutting that. But now if it's going to, if Dr. Seal would agree to prescribe me something for the anxiety, and it meant that I had to not drink at all, I'd be willing to do that at least for a period of time.",id +204_38,T,"So you'd be willing to stop altogether. That's what was indicated by the physician. Okay. So based on that, how ready are you to do anything right now, whether it's to cut back whether it's to quit?",irq +204_39,P,"Well, again, you know, if if I can get something to help me manage if maybe I can find some other way to deal with the stress, then then you know, I be pretty ready. Again, maybe about an on that scale, maybe an eight.",id +204_40,T,"Okay, so that's, that's pretty hot there as well. It sounds as though you're pretty motivated to do something about this right now, given any responsibilities given your children learning at this point. And just on lowering anxiety, in general, it sounds and that's one of your goals as well. Well, I'm pretty confident Once you decide to do whatever it is you decide to do, you'll be able to follow through with it. Based on your experience in the past of making behavior changes. I mentioned some things that you can draw upon. What's one thing that you could do? Imagine you thought of some things might help to lower your stress.",irq +204_41,P,"Oh, I you know that the exercise but again, that's that's kind of difficult to fit in right now. I'm hoping that Dr. Seal will prescribe something for me to take when I'm feeling particularly overwhelmed and maybe just having somebody to talk to to bounce some things off of ",id +204_42,T,"one of the things we can offer here is for you to come in and talk to one of our behavioral health specialists may be able to help you talk talk through this this area of your life, this area of increased stress and sound like responsibility there and we can make an appointment for you for like before you leave today to talk to somebody",id +204_43,P,That would be nice,ack +204_44,T,"that also has some information here if you're interested, some pamphlet on alcohol and and how what helps limits on how it may be affected by medications that you take as well. And I wish you lots of luck. It sounds as though you're really committed to making this shift in this change. And I imagine doctors still want to follow up with you and see how you do with your with your change within a few weeks.",id +204_45,P,Okay,ack +204_46,T,"Again, I look forward to speaking to you in the future.",gt +204_47,P,"All right, thank you very much.",gt diff --git a/HOPE_data/HOPE_therapy_session_transcripts/206.csv b/HOPE_data/HOPE_therapy_session_transcripts/206.csv new file mode 100644 index 0000000..a208b66 --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/206.csv @@ -0,0 +1,73 @@ +ID,Type,Utterance,Dialog_Act +206_0,T,"Yeah, okay. All right. What was your relationship with your teachers? And maybe those that some of the peers that you had at the school? I mean, was there any?",irq +206_1,P,"No, I usually I've been dealing with the teachers. Honestly, I was always the class clown. So I'm usually getting kicked out, getting detention, you know, so I didn't really get along with the teachers trying to teach class right stuff. ",id +206_2,T,Okay. So overall today are you pursuing or do you want to further your education,irq +206_3,P,"Yeah, I'm trying to get in college.",id +206_4,T,"Right. Yeah. Great. So you're looking into for year junior college,",irq +206_5,P,"yeah, a dream college.",id +206_6,T,"And what would be like, give me a little bit during the time that you were in school. Did you have a job heavy work?",irq +206_7,P,"I was working at cost wise, It's a restaurant Through the school, okay, and it was not like a job program, right, package of knives and forks and wrapped in salt and pepper and would send them over to the school. I mean to the restaurant. ",id +206_8,T,You sent over to the restaurant.,ynq +206_9,P,Yeah.,ack +206_10,T,"Okay. So you would prep everything, you know, all the tensile Ready? ",ynq +206_11,P,Yeah,ack +206_12,T,"Okay. Now, when you were working, how did that make you feel when you're working?",irq +206_13,P,"You know, I got boring at times, obviously And because the Patriots were also really small. ",id +206_14,T,but it was the start?,ynq +206_15,P,"Yeah, it was a start. ",ack +206_16,T,Right. And so how did it make you feel good? Because you work for something And then the finished product was your paycheck.,ynq +206_17,P,Yeah.,ack +206_18,T,"So if you want something in life, you pretty much have to work for it work for a car or not You have to work at a young age. How old were you when you started working?",irq +206_19,P,10 years old,id +206_20,T,"10 years old and then you started working and As a program for the school, so you know, you've known at a young age that it's going to take hard work,",gc +206_21,P,yeah to achieve something to achieve something.,gc +206_22,T,"Now, what about your dream job? What would be if tomorrow you could say, I'm gonna have this person tomorrow? Or this is my profession tomorrow? What would be your dream job? ",irq +206_23,P,A pilot,id +206_24,T,Wow. And when what was what's your reasoning behind that?,irq +206_25,P,I love airplanes I used to make smaller airplane,id +206_26,T,Tell me more about that. What would you do in your dream job?,irq +206_27,P,"I just want to fly by being in the end, I like going fast.",id +206_28,T,"Fast in the air and being above Yeah, I think being able to see different view. So pilot Have you looked into what it would take to become a pilot.",gc +206_29,P,"You know, the only struggle with thatI dont have to drink, I don't think this will work out",gc +206_30,T,What is you next dream job?,irq +206_31,P,A cop.,id +206_32,T,"Police Officer, have you looked into that what it takes?",irq +206_33,P,yeah trying to get back into this cadet program I was doing for about three weeks ago was doing it but was too far. So to kind of really go forward in my area,id +206_34,T,"right maybe that's something we can discuss to help you find the cadet program close fine. We're able to give you a, you know, some goals to set to get you in the program at that. But let's look at you know, back, let's back up a little bit to the marijuana. Because you and I know being in law enforcement, you know, marijuana and being a cop, pretty much ",gc +206_35,P,"Yeah, yeah. ",ack +206_36,T,And you would have to what would you have to do?,irq +206_37,P,"Let it go, I have to let it go. ",id +206_38,T,"So, what we want to do while you're here, you know, we want to help you here develop a treatment plan and treatment model where you can pursue some realistic goals. We want to set some goals for you. Also, what about your medical History tongue a little bit about your medical history. Have you ever been in the hospital? Has anything ever happened to a broken bone",irq +206_39,P,I had surgery on my cybereason,id +206_40,T,"What about in your family? Is there any diseases in your family and you want to know suffer for any illnesses, ailments. Okay. And as far as medical attention is there anyone that needs medical that needed medical attention in the past maybe someone on meds in your family psychological health? Was there anyone maybe that has gone to therapy that has been in therapy Your family and family member",irq +206_41,P,No.,yna +206_42,T,"And what we want to do, what I want to do to help you with this verse is one want to develop a treatment plan to help you with the marijuana use. We want to be able to look at your support system, you know who's in your life right now? What are your friends that you smoke marijuana with? What type of people are they? Would this be a good fit for you? But our whole goal is to start you off with small steps. So today, you're using marijuana how many times a day. So you pretty much said you use it every day. ",ynq +206_43,P,Yeah.,ack +206_44,T,But how many times?,irq +206_45,P,3-4 times,id +206_46,T,Do you wake up and you do?,irq +206_47,P,"yeah. It's not my morning routine. Go ahead and do it. And then usually around noon time I'll do it again and then towards five o'clock. I'll do it again at nighttime in Fargo. They'll do Again, right",id +206_48,T,so one of maybe one of the realistic goals is you're okay you know we can we can narrow down maybe the relationship see which of your friends right now today? How many of them smoke,irq +206_49,P,about six seven,id +206_50,T,Yeah so maybe a realistic short term goal is to begin to see which friends to hang out with you know and then also your mom man either way she,gc +206_51,P,"She told me before you fall into the wrong crowd and fall into something just she pretty much said that this if I keep this up is gonna get me into something I don't want to get into right now jail time round because we makes you do things that you shouldn't be doing for other things legal, right so,",gc +206_52,T,"so definitely we want to look at your whole peer relationships who your friends are We also want to look at your your time right now. So, you mentioned earlier that you were working. Are you working today? ",ynq +206_53,P,No.,yna +206_54,T,"Okay, so maybe that's another thing a realistic goal that we need to look at, and maybe help you pursue is it as a job? Maybe because the idle time sometimes can trigger events, you know, where you begin to want to use marijuana, and then we can identify some of the emotions that you're feeling. Let's go over that maybe briefly. Before you get before you smoke marijuana, is there a feeling that you have that says, hey, you depress, so we can look at the depression and see how we can treat that. What else? What are some of the other feelings that you see?",irq +206_55,P,"so angry, You know",id +206_56,T,what you think?,irq +206_57,P,"Be a bit boring, but my girlfriend So it's kind of a start. So it still bothers me as much as I'm trying to ignore it. Instead, it still bothers me. ",id +206_58,T,Right? There's a certain days that maybe perhaps you remember or events,ack +206_59,P,Like Thanksgiving and Christmas and holidays and things like that.,gc +206_60,T,That's when you become angry.,irq +206_61,P,Yes.,ack +206_62,T,How you were brought up?,irq +206_63,P,"Yeah its like that I don't appreciate my foster parents. Right? But just with Billy, I've been born with my biological right.",id +206_64,T,"So we want to we want to maybe will equip you with some coping skills, how to cope with those things, how to prepare you maybe for the holidays, maybe there's a way we can, you know, we can begin to look at that. During the holidays. This is these are the emotions I feel. So we identify those emotions and we'll be able to, you know, take care of that we'll be able to prepare you prior to you are you falling back into the trap of going out and using marijuana Maybe during Christmas? Do you feel the same way during Christmas?",ynq +206_65,P,Yeah,ack +206_66,T,"Maybe even your birthday, Father's Day, Mother's Day, these are all things that we can kind of get you ready for. Because once again, it's gonna take small steps, realistic goals. And then what we want to do after that the real estate goals is just get you ready, you know, for long term goal. But you know what, Curtis? I'm glad you came into my office. It was great meeting you. I look forward to working with you. ",id +206_67,P,All right.,ack +206_68,T,Is there any other questions that you may have for me? Is there anything?,irq +206_69,P,How many times a week Am I going to be allowed to come?,irq +206_70,T,"What Well, we can do we'll set you up with a treatment plan. And then I'd like to meet at least have two contacts with you your week. We can go over that. And then maybe during one of the context, we can help you with one, help you with a job. Okay? And then identifying some of the emotions. And then maybe we can get the whole marijuana use, we can begin to kind of taper it down instead of seven, you know, everyday. Yeah, we'll begin to see how we can take with that. Okay, we're down but again, I'm glad that you came. It was a pleasure meeting you and we'll be in touch and we'll be able to do it again.",id +206_71,P,Okay. All right.,gt diff --git a/HOPE_data/HOPE_therapy_session_transcripts/27.csv b/HOPE_data/HOPE_therapy_session_transcripts/27.csv new file mode 100644 index 0000000..97c3504 --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/27.csv @@ -0,0 +1,63 @@ +ID,Type,Utterance,Dialog_Act +27_0,T,"Okay, I want to thank you for your participation so far in this intake. But I want to move to another section of intake, specifically your family history if that's okay with you. So I'm going to be asking you various questions about your relatives. Okay, ",gc +27_1,P,yeah.,gc +27_2,T,Are you adopted?,ynq +27_3,P,No.,yna +27_4,T,All right. Are your parents married?,ynq +27_5,P,They're not married.,yna +27_6,T,She's married four times.,ynq +27_7,P,Yeah.,ack +27_8,T,What age were you when your parents divorced?,irq +27_9,P,I was about 16.,id +27_10,T,"And then your father you said, remarried. He did. And how long after the divorce? ",irq +27_11,P,I think it was about 18.,id +27_12,T,You're about 18. And then your mother remarried and was divorced a few times your sign?,irq +27_13,P,"Well, yeah, I mean, it was pretty much right after they got divorced. She married some guy. I don't even know he was nice guy, but it was like six months after pretty much like real fast. Um, and then that didn't last very long. Forgive me, I have to remember like how long they were together because there's so many. But I believe that they were only together for not even a year. And then she kind of had some time where she just was dating But it was numerous people. And then she met somebody in her a meeting. And they married. That lasted, that they probably got married.",id +27_14,T,"So well, she was married to your father.",ynq +27_15,P,Yeah.,ack +27_16,T,"And then, very quickly after that, you said and then she met some a Meeting.",irq +27_17,P,"Yes, that's a third and then this one would be Oh, yeah, the fourth the fourth. Okay.",id +27_18,T,Yeah. She married now.,ynq +27_19,P,"No, no. Now she's, I don't know, just dating or whatever she was",yna +27_20,T,how long did the last marriage so that,irq +27_21,P,was three years that was the longest.,id +27_22,T,So how's your relationship with your father?,irq +27_23,P,"Um, it's good, I guess. I mean,",id +27_24,T,"All right, how about your relationship with your mother?",irq +27_25,P,"Um, it's just it's honestly there's no other way to describe it. It's just chaotic. I mean, she's chaotic. So she's all over the place and it's just Hard to capture on a good day. And when you do, it's just you know, it's kind of surface our relationship.",id +27_26,T,"Alright, so who? Who raised you?",irq +27_27,P,"My parents raised me? Yeah, yeah. I mean, they were good parents, I guess, according to my standards, because my mom was just always a mess. So I guess they both did the best that they could, given some circumstances. So",id +27_28,T,"do you think the way they're raised has an impact on who you are now in terms of,",irq +27_29,P,"um, I think so. Yeah, definitely.",id +27_30,T,"tough memories in Yeah,",ynq +27_31,P,"yeah, absolutely. ",ack +27_32,T,Can you tell me about your siblings?,irq +27_33,P,I do. I do. I have two siblings. Okay.,id +27_34,T,So what's your relationship with with them now? What's it like now?,irq +27_35,P,"Um, it's okay. You know, I guess. I mean,",id +27_36,T,I didn't mention that. Everybody went their separate way.,irq +27_37,P,"Yeah. I don't really see them quite honestly. So If I do see them and maybe it's like if I show up at a at a family party once every five years, but so I think to me, that's okay. That's right. Yeah.",id +27_38,T,You're satisfied with your relationship with them?,irq +27_39,P,"I think so. I mean, you know, it's not my fault that they won't accept who I am.",id +27_40,T,"Are you aware of any medical conditions that like your mother and father might have or your grandparents,",irq +27_41,P,"like heart disease or anything like back in the medical? My grandpa had like heart disease. My grandfather had cancer but he beat colon cancer was in like the first stage but he was fine after. But as far as my parents, they don't have any medical issues that I know of.",id +27_42,T,"All right, how about kind of same question except for mental health conditions.",irq +27_43,P,I'm just crazy. Like my mom was crazy and she was just completely,id +27_44,T,You have any formal diagnosis she had her um,irq +27_45,P,"she uses magnetic like I guess like bipolar, but we she never really got like a definitive label as dipole bipolar and like therapy or anything like that. But",id +27_46,T,"you know, symptoms of bipolar and anxiety. Yeah.",irq +27_47,P,"No, that's just my mom with her. You know obsessiveness and she'd get depressed after But as far as any other siblings No, no.",id +27_48,T,Do you have any special family traditions?,irq +27_49,P,"I mean, we would go on family vacations. When I was a kid. We were constantly staying at the best hotels and stuff like that. Because a mom, you know, would shop around, she actually would Book Three hotels, and just decide which one she liked better when we got there. I don't, I don't know. But anyway, we would do that we would go on vacations together, we would always go down to the beach. So that was really our family tradition as far as in like holidays. We did when we were younger. We would have like our family over for Christmas and stuff like that. But",id +27_50,T,"can you tell me about holidays, like were the most important holidays to your family.",irq +27_51,P,"I Christmas was yester During the most important Thanksgiving, ",id +27_52,T,how did you celebrate those holidays?,irq +27_53,P,"Sometimes we would go to my cousin's house on my dad's side, and Christmas would be at my parents house and then Easter woods. It was just very back back and forth between my cousins or my parents, whoever wanted to happen.",id +27_54,T,Can you tell me about your extended family?,irq +27_55,P,"my extended family? Well, on my dad's side, my uncle, he's super successful. And he's a cool guy, you know, I don't really see him now. But when I was a kid, I did. But now I don't see him at all. Honestly, I don't really see anybody at all. But um, yeah, and on my mom's side, she has a sister. And she's like crazy, but she's not as crazy as my mom. But she has she has two kids. And she's actually still married to her to her husband. They were actually highschool sweethearts, so I don't have where my mom came from but and I hadn't seen her probably since I graduated high school. And, you know, she associates my mom and they talk amongst themselves so I don't really have a relationship with her either. So",id +27_56,T,"Alright, so not not many active relationships there. Your family history. It sounds like so.",irq +27_57,P,"Well, yeah, there's not many now.",id +27_58,T,Is there anything else you want to tell me about your family history?,irq +27_59,P,"Um, my mom would drink sometimes when I was growing up, but that's what my mom is really friendly to me when she would drink And yeah, she would drink. I don't know if that's, you know, she was considered an alcoholic but she would drink often. And I think just to come off of her shopping a lot she would drink or vice versa. Sometimes she would drink or shopping or just to calm down, she would drink and sometimes in our drinking habits, she would actually be nice to me.",id +27_60,T,And they also have something.,ynq +27_61,P,Definitely.,ack diff --git a/HOPE_data/HOPE_therapy_session_transcripts/48.csv b/HOPE_data/HOPE_therapy_session_transcripts/48.csv new file mode 100644 index 0000000..37516fe --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/48.csv @@ -0,0 +1,49 @@ +ID,Type,Utterance,Dialog_Act +48_0,T,"Hi, Miss Watson, see you again. See, I'm glad you came back in. I've got the results now of the blood work that we did after your checkup. ",gt +48_1,P,Okay.,ack +48_2,T,And before we go over any of that I really wanted to find out from you how things are going and what you're concerned about.,irq +48_3,P,"Well, I mean, I'm, I'm curious about them because I haven't been very well, right. I haven't been very, very well. I've been last week I threw up some blood. ",id +48_4,T,Is that the first time that's happened?,irq +48_5,P,"Yeah, the first time. I mean, I threw up blood last weekend then. Again, yesterday. So there's something bad going on. I know there's something bad going ",id +48_6,T,What do you think is going,irq +48_7,P,what cancer right I think I probably have cancer i'm not i'm not doing very well I just look headaches and I was just,id +48_8,T,"let's try to figure some of this out. Okay. When you said you were throwing up blubbery, throwing up bright red blood and was it like little spots, big spots?",irq +48_9,P,"It was a it was almost filling a toilet wasn't that much. I wasn't like that it was enough that I could see it in the toilet, and I was throwing up.",id +48_10,T,And did did you have any other symptoms?,irq +48_11,P,"Well, I was feeling sick. So and I had headaches and I, you know, I've got,",id +48_12,T,what time of day was this? ,irq +48_13,P,I have headaches a lot,id +48_14,T,"throughout the day, throwing up the blood",irq +48_15,P,"that was in the morning and then again,",id +48_16,P,"the other time it was sort of later in the day, but I",id +48_17,P,"you know, I also wake up in the middle of the night and I'm just covered in sweat. I know that's another cancer thing.",id +48_18,T,"Look, I can understand why you're worried. All right, because throwing up Blood is scary, and waking up soaked in sweat in the middle of the night. That doesn't feel right either. Let me ask you a couple of questions that might help explain things. When did you have your last drink?",gc +48_19,P,"Actually, just before I came here,",id +48_20,T,"okay, so that was earlier this morning. All right, what did you have?",irq +48_21,P,"I had orange juice and I had some vodka in it. It's the only thing actually that like steadies me enough to get out the door. I don't ever go out that often. But right now,",id +48_22,T,so tell me how it helps you.,irq +48_23,P,"It's just studies me studies me like I'm, you know, I'm shaking all the time. I'm just like,",id +48_24,T,"So over the course of the day, in order to study yourself in order to feel calmer. How many drinks do you end up having?",irq +48_25,P,"Five? Hmm, maybe",id +48_26,T,singles or doubles?,irq +48_27,P,I don't measure,id +48_28,T,right. So is it mainly vodka,gc +48_29,P,"Sometimes if I'm feeling really like my stomach is really upset, I'll drink cider. So that's its cider or vodka because",gc +48_30,T,"and you ever get that feeling in the morning that some people describe that they wake up feeling so edgy. They need a drink to calm down. Yeah. It's like the only thing that works for me. Anything that works, too. So in the past week, do you think you've been drinking more?",irq +48_31,P,In the last week? Not so much in the last couple of weeks maybe?,irq +48_32,T,"Hasn't been daily. Oh, yeah. Right. So the longest you've gone without a drink in the last month would be how long?",id +48_33,P,"I don't know. Actually. I mean, I don't know. I've got you know, I've got a lot going on. Right. Yeah. So my, my sister is in Boston, she's got cancer and I know like I should be calling her and I can't do that. My mom is really sick and she's horrible, and I'm the only one that Who can go see her? And I go see my mother and she just yells and screams at me and she's got this email and it's just",id +48_34,T,"so for all of those things, the alcohol helps.",ynq +48_35,P,"Yeah, yeah.",ack +48_36,T,"Yeah. And does it ever happen sort of by the end of the day, that you have trouble the next day remembering what happened?",irq +48_37,P,"I guess. I mean, I, you know, my days don't differ that much. But I, you know, I'll fall asleep in front of television and then I'm not seeing lots of people so I you know, there's not big events in my life that I would be remembering. I just, you know, especially now that I'm feeling so not well, that I",id +48_38,P,"yeah, there's not much that I would have to remember",id +48_39,T,having that. Have you tried it all to cut down on your drinking?,ynq +48_40,P,I did. I did.,ack +48_41,P,"You know, I had a boyfriend who",id +48_42,P,"you know, was Sort of casual coming over and, and he, he basically said he couldn't be with me anymore because I drink too much. And so I tried. I tried. I was like, Well, yeah, and then he left. So who cares, right? I mean, right?",id +48_43,T,You find yourself feeling feeling guilty about the alcohol.,ynq +48_44,P,"I feel guilty about my sister, right? I feel guilty that I can't like I just can't. I can't even call her like I can't.",id +48_45,P,Right. So,id +48_46,P,"if I, if I could pull it together than I could,",id +48_47,T,"because what I understand from what you're telling me is that the drinking helps meet a certain need for you, in terms of trying to hold things together with all this stuff going on, and meets a need in terms of trying to keep you calmer. But at the same time, it's getting you into trouble. It's getting into trouble in terms of relationships, but it's also the most likely act explanation for why you've been throwing up blood isn't why the lab results that I've got are consistent with an amount of alcohol that's too much for your body to handle. Really, really, and that means, ideally, that we're going to work together to find a way to do something about it.",gc diff --git a/HOPE_data/HOPE_therapy_session_transcripts/67.csv b/HOPE_data/HOPE_therapy_session_transcripts/67.csv new file mode 100644 index 0000000..5c68c82 --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/67.csv @@ -0,0 +1,55 @@ +ID,Type,Utterance,Dialog_Act +67_0,T,"sure you understand you've been having some symptoms which have been bothering you, but can you tell me what you think's going on?",irq +67_1,P,"Yeah, I've been feeling really low and I think I might be depressed. ",id +67_2,T,You think you might be depressed?,irq +67_3,T,Have you ever felt this way in the past?,irq +67_4,P,I mean,id +67_5,P,"years ago I you know, felt had some of these similar things. But I didn't really think about it much and I mean, it's gone on for like, I've been feeling this way for like a month. And, you know, I I think something's wrong.",id +67_6,T,"having any feelings of sad sadness, hopelessness?",ynq +67_7,P,"Yeah,",ack +67_8,T,yeah?,irq +67_9,P,Yeah. I haven't been able to sleep.,id +67_10,T,trouble sleeping?,irq +67_11,P,This has been going on for a month.,id +67_12,P,Yeah,gc +67_13,T,Have you noticed a change in your ability to experience fun or pleasure?,irq +67_14,P,"I haven't really thought about it. But I mean, I still have fun sometimes.",id +67_15,P,I just noticed that most of my,gc +67_16,T,"most time you're sad, but you still have fun. Have you lost an interest in pursuing things that are fun?",irq +67_17,P,"No, I mean, I still try, you know, you know, to distract myself. Like if I noticed that I'm like, just feeling really low and or like, even if I can't sleep At night, like I'll do go do something that I like doing. You know how to pass the time?",yna +67_18,T,Any change in your appetite or weight in the last couple weeks?,irq +67_19,P,"Yeah, I mean, I haven't really been eating that much. And I've actually lost a few pounds. Yes, three pounds. Yeah.",ack +67_20,T,And you mentioned the sleep disturbance not been sleeping as much as you'd like to?,irq +67_21,P,"Correct. It's really hard for me to fall asleep. And sometimes I'll just lie there for hours at night and it's, you know, awful focused, and I'm tired all day, because I didn't sleep at night. And when I get home and it's time for bed again, I still can't fall asleep.",id +67_22,T,So that's been affecting your energy level?,ynq +67_23,P,Yeah.,ack +67_24,T,Do you feel restless or the opposite kind of slowed down and having either one of those feelings.,irq +67_25,P,"No, not really like that",yna +67_26,T,have been having any feelings of worthlessness?,ynq +67_27,P,No.,yna +67_28,T,like that?,irq +67_29,P,"no, I mean, like not really no, like, I don't feel worthless. I just you know, I just I'm still sad. I don't know why I'm sad. ",id +67_30,T,How about your concentration level any changes there?,irq +67_31,P,"Yeah, it's it's hard to concentrate at work and, and in general even at home because I just am so tired. not sleeping and tonight I just get distracted by like, you know, like, I'll be over, come with emotion and I out of nowhere, like it's hard for me to pay attention to what I'm doing. If I'm getting distracted by those thoughts.",id +67_32,T,Have you been having any thoughts related to death or dying?,ynq +67_33,P,Nothing like that. No.,yna +67_34,T,"So these symptoms you've been describing, have been causing limitations in your functioning in what areas",irq +67_35,P,what work,irq +67_36,P,at home to,id +67_37,P," I want to play with my cat I usually like my cat for like an hour every night, just because I'm at work all day but I haven't I've been having trouble like even doing that. Yeah, so I would say and then even like my relationships to like my social life, it's been affecting it.",id +67_38,T,Any drug or alcohol use?,ynq +67_39,P,NO,yna +67_40,T,How about any medical conditions?,ynq +67_41,P,Nothing,yna +67_42,T,see or hear things other people can't see or hear?,ynq +67_43,P,No.,yna +67_44,T,Has it ever happened to you?,ynq +67_45,P,No. Never,yna +67_46,T,"do you feel now recently wherever you're at a state where you're cheating too happy, like had a lot of energy and ",irq +67_47,P,"like make mania,",irq +67_48,T,like mania? Yeah. Nothing like that. Ever.,id +67_49,T,Has there been any major event in the last month? Or maybe before that did you think might be causing this,irq +67_50,P,nothing Nothing's in there significance happened to make me feel this way,id +67_51,T,other than you think would cause depression.,gc +67_52,T,"Sherry, I'm going to get you in to see a counselor here. Just take a couple days to get you in. Is that okay? I want to thank you for answering these questions. For me. This has been helpful.",gt +67_53,P,Yeah. All right.,gt diff --git a/HOPE_data/HOPE_therapy_session_transcripts/75.csv b/HOPE_data/HOPE_therapy_session_transcripts/75.csv new file mode 100644 index 0000000..59054ff --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/75.csv @@ -0,0 +1,55 @@ +ID,Type,Utterance,Dialog_Act +75_0,T,Does the feeling itself of not being prepared interfere with preparing?,irq +75_1,P,"Yes, it's really hard. So like when I'm in the middle of being worried, I'm it's really hard for me to focus. So I can't focus on like what I need to do. Because I feel like my mind is on a lot of different things and I can't focus on you know exactly what I should be doing. It's just like, I'm worried about You know, all the different aspects.",id +75_2,T,"Alright, so your ability to concentrate and do the hard work of preparing is affected",irq +75_3,P,"Yeah, it's like focus my energy on the right things. I'm just like wasting time worrying.",id +75_4,T,"Alright, so this excessive worrying and all this interfering of preparing all this goes on right up until you're getting ready to present",irq +75_5,P,Yeah. And then like while I'm presenting,yna +75_6,T,so let's talk about that let's go into the actual day a present so we have a successive work coming in it's interfering with your ability but it's distressing for you.,irq +75_7,P,Yeah.,yna +75_8,T,Now these presentations are in class? ,irq +75_9,P,Yeah,id +75_10,T,So it's you're in you're in the classroom. Do you write the only one to present in that classroom is it rotate through several PV?,irq +75_11,P,"It depends on the presentation. Sometimes there's like one or two other people that have to present that night, depending on like how long the topic is.",id +75_12,T,"All right, well, let's choose the last time you presented that classes as a template. What was the order to go in there?",irq +75_13,P,"Well, the one that I really messed up, I think in that I was first But usually, like, I'm like, second maybe.",id +75_14,T,"Okay. So for this example, let's say you're through the second. Okay, so you're sitting in the classroom and another student is presenting. What's going through mind that?",irq +75_15,P,"I feel like I am totally zoned out. Like I'm not even paying attention to what that person saying, because I'm so worried about how I'm gonna mess it up. You know, I'm, I'm starting to like be sweaty, like my hands are clammy, my heart started to race a little bit, and I'm just totally zoned out on what they're doing. Just, you know, worrying about what's gonna happen when I get up there.",id +75_16,T,"So in that moment as you're seated, you're not really watching their presentation as much because you have these strong or somewhat strong physical symptoms. You have your heart racing a bit is sweaty palms. You're zoned out. Have you ever felt the need desire to, like, run out of the room?",id +75_17,P,Yes. It's funny you should say that was a little bit hesitant to mention that but I kind of I do I feel like I need to find excuse to like use the bathroom or I just need to get out of there.,yna +75_18,T,"Yeah, so what do you feel is most pressuring you to leave the room like what? What symptom?",irq +75_19,P,"Um,",gc +75_20,T,"And what thoughts are going through your mind right then like, so let's take that kind of severe moment. When you're, you're, let's just say still before the presentation, okay? So you're sitting at the desk and your heart rates elevated. And you're not focusing on what they're doing. You're zoned out your anxieties high. What was going through your mind right, then?",irq +75_21,P,"I think I'm thinking, like, I'm gonna bomb this anyway. So I might as well just, you know, not go through the stress of having to do it. Like I've already in my head, I know that it's going to end badly.",id +75_22,T,So you've already failed.,irq +75_23,P,"right. So there's no sense in getting up there. And maybe if I don't get up there, you know, I guess it couldn't be any worse. So I might as well just leave",id +75_24,T,Are you embarrassed that the professor or Other students will see that you were really anxious?,ynq +75_25,P,"Yeah, I don't want I figure if I leave and people won't, will just make me think I was sick or whatever. And it'll be a better situation, if I just left then happened to see me up there, you know, sweating and all these other symptoms that I have when I actually get up there, it would be better just to leave before that starts.",yna +75_26,T,"Okay. So, so better to be thought ill and had to leave because you're saying. ",irq +75_27,P,"Yeah, or have them wonder what happened then to just be up in front of everybody, you know,",id +75_28,T,to have a severe anxiety for that buddy. And then they can very embarrassing. That would be a very undesirable outcome for you.,irq +75_29,P,Right.,id +75_30,T,"So as you're debating that thought, because that's coming to your head, and you're thinking I just need to, yeah, gotta get out here. What happens there, so we're maybe What, 15 minutes before we present? So tell me about that. So you have that thought you want to flee,",irq +75_31,P,"right. And I'm looking at the clock and saying, you know, like, how much more time in this presentation before I have to go like, should I go? Should I not go? What are the consequences of running out? You know, and kind of playing out, which would be worse?",id +75_32,T,Have you ever had to run out?,ynq +75_33,P,"Um, once I went to the bathroom to try to, like calm myself down or talk to myself, or you know, like, Cool off my face. Um, but I came back",yna +75_34,T,"and you presented then you presented Alright, so you you survived. One of the more stressful presentations",irq +75_35,P,"Yeah, I almost felt like I was gonna be ill. I was so stressed that day.",id +75_36,T,"That was very, very tough on you. What happened on that particular day?",irq +75_37,P,"So typically, like, I go to load my presentation, at this point, like, I have my new cards or whatever, in front of me. I am like, shaking at this point. I am so I don't know if it's scared, or worried or maybe a combination of everything. And I'm just like sweating. My heart is racing. Like I almost feel dizzy. I'm just so stressed out about what's going to happen. And then you know, I'm starting to speak. And then the presentations are usually like 20 minutes or so. Okay, so I have to stay up there for the duration and I'm just like, you know, sweating and then I'm wondering like, are people looking at me or people? Can people see it? You know, am I going to forget something?",id +75_38,T,"So the some of the thoughts are you wonder if they can see how anxious you are you wonder if you're gonna do poorly on the presentation,",irq +75_39,P,"right. Or they think I've been lazy and I didn't prepare, are they going to think that, you know, I'm dumb or I don't know, you know what I'm doing.",id +75_40,T,"So they might, they might think less of you as a person.",irq +75_41,P,Right. Or like be judging me. Okay.,id +75_42,T,Yeah. So there's a number of concerns that kind of going through your mind in that moment. So when does this start to turn around so you start presenting is 20 minutes you initially get up there and get your presentation up on the The projection monitor. Yeah. When does it start to turn the corner?,id +75_43,P,"Um, it's depends sometimes I settled down a little bit, but then usually like that, I get some sort of rhythm I think. And then, but then it gets anxiety again until I get my grades. Do you know what I mean? And I'm like, until, because I feel like I'm gonna do poorly. Until that happens when",id +75_44,T,when you receive the grades.,irq +75_45,P,"Sometimes, like she usually doesn't give them that day but like often like the next day or the day after",id +75_46,T,So does that intense anxiety that you're having while you're presenting last all the way?,ynq +75_47,P,now? It definitely like dissipates once I can like go sit down.,yna +75_48,T,"Okay, so so the sort of next big drop off for symptoms would be when you're done with the presentation",irq +75_49,P,"Yeah, when eyes are maybe no longer on me. They've moved on to somebody else. So I figured like, okay, they forgot about me. I'm safe.",id +75_50,T,"All right, then. But then there's this other worry of now we have to see what the grades are right?",ynq +75_51,P,And I convince myself that I did poorly.,id +75_52,T,So the thought is going through your mind is I'm gonna receive a bad grade.,ynq +75_53,P,"Yeah, and that everyone saw me, you know, sweating and all these symptoms that I have everyone is judging me",yna diff --git a/HOPE_data/HOPE_therapy_session_transcripts/97.csv b/HOPE_data/HOPE_therapy_session_transcripts/97.csv new file mode 100644 index 0000000..15877f4 --- /dev/null +++ b/HOPE_data/HOPE_therapy_session_transcripts/97.csv @@ -0,0 +1,27 @@ +ID,Type,Utterance,Dialog_Act +97_0,T,"Jackie, I joined today. Okay, how about you?",gt +97_1,P,"I do well, thanks for asking. ",gt +97_2,T,I understand you've been having some difficulties recently that have brought you into the agency.,id +97_3,P,"Yeah, I'm, I'm recently married. And so my husband and I moved in together. And up until then I I've lived by myself. My whole adult life. So apparently the craziest things have been happening. While I've been sleeping. several, several nights I've woken him up screaming. I'm screaming. Apparently a very vulgar, profane, profane the words and So that's a little alarming to him. And I've even, you know, we've been hitting him in the middle of the night. You know, he's waking up with these huge bruises on his arms. And so yeah, apparently, a behavior in the middle of the night is out of hand.",id +97_4,T,So I can understand why that would be distressing. Have you seen a physician about this?,ynq +97_5,P,"Yes. Um, I participated in a sleep study and what they say they rolled out some some other things and thought that maybe it was a behavior, Sleep Disorder. So they have referred me to you, I'm still working with them. Now. They're still running some tests and everything but they thought maybe there are some other stressors or underlying things, so",id +97_6,T,that might be going on. So what would you like from counseling?,irq +97_7,P,"Colby? Um, well, I'm just little worried that it's going to affect my marriage and that my husband will not be able to deal with that. So I would just really like to figure out how to keep my relationship with Him successful with it. So overcome these issues.",id +97_8,T,"So, after you were yelling things, or you hit him, like you're asleep during this time, when you wake up, what's going through your mind then?",irq +97_9,P,"Usually I wake up and he's like, what are you doing? I was having the worst dream. So those dreams are kind of what he's telling me are aligning. What my behavior is, my dreams are aligning with those. So you know, I don't feel anything. It doesn't feel like I've been anything. I have. I've met a couple times and woken up, but no people do that. So I didn't really think anything of it. But now I'm starting to wonder. Yeah, it's it's a little strange. So Oh, concerning.",id +97_10,T,Sorry. I wonder if you have this disorder before?,irq +97_11,P,"Yeah, I mean, I would, I wouldn't have known. I've lived by myself. But you know, I, before I had fallen out of bed a couple times, and, you know, my sheets and pillows are always everywhere when I wake up, but I didn't really think anything of it. So kind of making the connections now.",id +97_12,T,"So he's been paying attention to what's going on with your sleep. Does the episode of yelling or moving around, does it happen a certain time limit? Like what happened right after you go to sleep or a while",irq +97_13,P,"after you go to sleep? I'm in the middle of the night he has. He said at first he thought I was joking around But, yeah, no, no, I am waking him up, you know. So",id +97_14,T,does that ever happen when you take like a nap for a short nap?,ynq +97_15,P,No.,yna +97_16,T,Not that I know,gc +97_17,P,"that he's, he's usually around electronic cash snapping he says it hasn't happened and so. Alright.",gc +97_18,T,"So only at night when you're sleeping overnight and in the middle of that sleep. All right, would you be okay with sign a release so I can communicate with your question. ",irq +97_19,P,Yeah.,yna +97_20,T,And do you want your husband to be part of the counseling?,ynq +97_21,P,"Yeah, that would probably be helpful for him to kind of get this side of things too.",id +97_22,T,And you'd be okay saying release for him?,ynq +97_23,P,"Yes, yes.",yna +97_24,T,So I'll get you scheduled into see a counselor. I appreciate you tell me what's going on. ,gt +97_25,P,It's been it's been helpful. Thank you. Prepare health,gt diff --git a/SPARTA_model/.DS_Store b/SPARTA_model/.DS_Store new file mode 100644 index 0000000..371df13 Binary files /dev/null and b/SPARTA_model/.DS_Store differ diff --git a/SPARTA_model/Trainer.py b/SPARTA_model/Trainer.py new file mode 100644 index 0000000..db6c317 --- /dev/null +++ b/SPARTA_model/Trainer.py @@ -0,0 +1,148 @@ +import torch +import wandb +import pytorch_lightning as pl +import torch.nn.functional as F +import torch.optim as optim +from typing import Any, NoReturn +from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, classification_report +from .dataset.dataset import DADataset +from datasets import load_dataset +from torch.utils.data import DataLoader + + + + +class LightningModel(pl.LightningModule): + + def __init__(self, model, tokenizer, config): + super(LightningModel, self).__init__() + + self.config = config + self.model_config = config['model_config'][config['select_model_config']] + + + + self.model = model + self.tokenizer = tokenizer + + + self.si_memory = torch.randn((self.config['window_size'], self.config['hidden_size']), device=self.config['device']) + self.sa_memory = torch.randn((self.config['window_size'], self.config['hidden_size']), device=self.config['device']) + self.si_global_context = None + self.sa_global_context = None + + print(f'Total trainable parameters = {self.count_parameters()}') + + + def count_parameters(self): + return sum(p.numel() for p in self.parameters() if p.requires_grad) + + def forward(self, batch): + + outputs = self.model( + batch=batch, + si_memory=self.si_memory, + sa_memory=self.sa_memory, + sa_global_context=self.sa_global_context, + si_global_context=self.si_global_context, + ) + + + # # update the memory and global context + # # self.si_memory = outputs['si_memory'] + self.si_global_context = outputs['si_global_context'] + self.sa_global_context = outputs['sa_global_context'] + + self.sa_memory = outputs['sa_memory'] + self.si_memory = outputs['si_memory'] + + + return outputs['logits'] + + + def configure_optimizers(self): + + return optim.Adam(params=self.parameters(), lr=self.config['lr']) + + + def train_dataloader(self): + train_data = load_dataset("csv", data_files=self.config['data_dir']+self.config['data_files']['train']) + + train_dataset = DADataset(tokenizer=self.tokenizer, data=train_data['train'], fields=self.config['fields'], max_len=self.config['max_len']) + + ## create data loaders + train_loader = DataLoader(dataset=train_dataset, batch_size=self.config['batch_size'], shuffle=False, num_workers=self.config['num_workers']) + + + return train_loader + + + def training_step(self, batch, batch_idx): + targets = batch['label'] + logits = self(batch) + + loss = F.cross_entropy(logits, targets) + + acc = accuracy_score(targets.cpu(), logits.argmax(dim=1).cpu()) + f1 = f1_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + wandb.log({"loss":loss, "accuracy":acc, "f1_score":f1}) + return {"loss":loss, "accuracy":acc, "f1_score":f1} + + def val_dataloader(self): + valid_data = load_dataset("csv", data_files=self.config['data_dir']+self.config['data_files']['valid']) + valid_dataset = DADataset(tokenizer=self.tokenizer, data=valid_data['train'], fields=self.config['fields'], max_len=self.config['max_len']) + valid_loader = DataLoader(dataset=valid_dataset, batch_size=self.config['batch_size'], shuffle=False, num_workers=self.config['num_workers']) + return valid_loader + + def validation_step(self, batch, batch_idx): + + targets = batch['label'] + + logits = self(batch) + + loss = F.cross_entropy(logits, targets) + acc = accuracy_score(targets.cpu(), logits.argmax(dim=1).cpu()) + f1 = f1_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + precision = precision_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + recall = recall_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + return {"val_loss":loss, "val_accuracy":torch.tensor([acc]), "val_f1":torch.tensor([f1]), "val_precision":torch.tensor([precision]), "val_recall":torch.tensor([recall])} + + def validation_epoch_end(self, outputs): + avg_loss = torch.stack([x['val_loss'] for x in outputs]).mean() + avg_acc = torch.stack([x['val_accuracy'] for x in outputs]).mean() + avg_f1 = torch.stack([x['val_f1'] for x in outputs]).mean() + avg_precision = torch.stack([x['val_precision'] for x in outputs]).mean() + avg_recall = torch.stack([x['val_recall'] for x in outputs]).mean() + wandb.log({"val_loss":avg_loss, "val_accuracy":avg_acc, "val_f1":avg_f1, "val_precision":avg_precision, "val_recall":avg_recall}) + return {"val_loss":avg_loss, "val_accuracy":avg_acc, "val_f1":avg_f1, "val_precision":avg_precision, "val_recall":avg_recall} + + def test_dataloader(self): + test_data = load_dataset("csv", data_files=self.config['data_dir']+self.config['data_files']['test']) + test_dataset = DADataset(tokenizer=self.tokenizer, data=test_data['train'], fields=self.config['fields'], max_len=self.config['max_len']) + test_loader = DataLoader(dataset=test_dataset, batch_size=self.config['batch_size'], shuffle=False, num_workers=self.config['num_workers']) + return test_loader + + def test_step(self, batch, batch_idx): + + targets = batch['label'] + + logits = self(batch) + + loss = F.cross_entropy(logits, targets) + acc = accuracy_score(targets.cpu(), logits.argmax(dim=1).cpu()) + f1 = f1_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + precision = precision_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + recall = recall_score(targets.cpu(), logits.argmax(dim=1).cpu(), average=self.config['average']) + return {"test_loss":loss, "test_precision":torch.tensor([precision]), "test_recall":torch.tensor([recall]), "test_accuracy":torch.tensor([acc]), "test_f1":torch.tensor([f1])} + + def test_epoch_end(self, outputs): + avg_loss = torch.stack([x['test_loss'] for x in outputs]).mean() + avg_acc = torch.stack([x['test_accuracy'] for x in outputs]).mean() + avg_f1 = torch.stack([x['test_f1'] for x in outputs]).mean() + avg_precision = torch.stack([x['test_precision'] for x in outputs]).mean() + avg_recall = torch.stack([x['test_recall'] for x in outputs]).mean() + return {"test_loss":avg_loss, "test_precision":avg_precision, "test_recall":avg_recall, "test_acc":avg_acc, "test_f1":avg_f1} + + + + \ No newline at end of file diff --git a/SPARTA_model/config.py b/SPARTA_model/config.py new file mode 100644 index 0000000..66a39bb --- /dev/null +++ b/SPARTA_model/config.py @@ -0,0 +1,63 @@ +import torch +config = { + # data + "data_dir":"./drive/MyDrive/a2g-merged/", + "data_files":{ + "train":"a2g_train.csv", + "valid":"a2g_valid.csv", + "test":"a2g_test.csv", + }, + # field to read from the dataset, its is limited to our dataset only + "fields":{ + "text":"Utterance", + "act":"Dialog_Act", + "label":"Dialog_Act_Label", + "id":"ID", + "speaker":"Type" + }, + + "max_len":512, + "batch_size":8, + "num_workers":6, + + "previous_sid":"start", + + # models + "model_name":"roberta-base", + "hidden_size":768, + "num_layers":1, + "num_heads":12, + "dropout":0.15, + "need_weights":True, + "start_sid":"start", + "window_size":6, + + "speaker_classifier_ckpt_path":"./drive/MyDrive/speaker-classifier/classifier.ckpt", + + "num_speakers":2, + + "hidden":[1024, 768, 512, 256, 128, 64], + + "num_dialogue_acts":10, + + "model_config":None, #model_config, + "select_model_config":-1, # it will be from [0, 1, 2, 3, 4, 5, 6, 7] + + + + # training config + # training + "device":torch.device("cuda" if torch.cuda.is_available() else "cpu"), + "save_dir":"./", + "project":"dialogue-act-classification", + + "lr":1e-5, + "monitor":"val_f1", + "min_delta":0.001, + "patience":5, + "filepath":"./models/{epoch}-{val_accuracy:4f}", + "precision":32, + "epochs":50, + "average":"macro" + +} \ No newline at end of file diff --git a/SPARTA_model/dataset/dataset.py b/SPARTA_model/dataset/dataset.py new file mode 100644 index 0000000..37534d4 --- /dev/null +++ b/SPARTA_model/dataset/dataset.py @@ -0,0 +1,108 @@ +import torch +from typing import Any, NoReturn +from torch.utils.data import Dataset +class DADataset(Dataset): + """ + Custom Dataset class to create the DA dataset + + Arguments: + tokenizer: tokenizer to tokenize the utterance + data: data either a df or hugginface dataset + train: whether its training set or not if True we will build the label dict else not + text_field: text field in the dataframe + label_field: label field in the dataframe + max_len: maximum sequence length, truncation and padding will be applied + """ + + __label_dict = dict() + __speaker_dict = { + "T":0, + "P":1, + } + + def __init__(self, + tokenizer:Any, + data:Any, + fields:dict, + max_len:int=512)->None: + + self.text = data[fields['text']] + self.act = data[fields['act']] + self.label = data[fields['label']] + self.speaker = data[fields['speaker']] + self.ids = data[fields['id']] + + self.tokenizer = tokenizer + self.max_len = max_len + + # build label and speaker dict dictionary + for i in range(len(self.act)): + if self.act[i] not in DADataset.__label_dict.keys(): + DADataset.__label_dict[self.act[i]]=self.label[i] + + + def __len__(self)->int: + return len(self.text) + + def label_dict(self)->dict: + """ + label_dict method get the label vocab + Returns: + label dict, a dictionary containing class name as keys and indices as values + """ + + return DADataset.__label_dict + + + def speaker_dict(self)->dict: + """ + label_dict method get the label vocab + Returns: + label dict, a dictionary containing class name as keys and indices as values + """ + + return DADataset.__speaker_dict + + + + def __getitem__(self, index:int)->dict: + """ + __getitem__() method to get a sample from dataset + + Parameters: + index: index of datasets to fetch the utterance + + Returns: + item as dictionary + """ + + text = self.text[index] + + act = self.act[index] + label = self.label[index] + speaker = DADataset.__speaker_dict[self.speaker[index]] + session_id = self.ids[index].split("_")[0] + + + # encode the text + input_encoding = self.tokenizer.encode_plus( + text=text, + truncation=True, + max_length=self.max_len, + return_tensors="pt", + return_attention_mask=True, + padding="max_length", + return_length=True + + ) + + return { + "text":text, + "input_ids":input_encoding['input_ids'].squeeze(), + "attention_mask":input_encoding['attention_mask'].squeeze(), + "act":act, + "label":torch.tensor([label], dtype=torch.long).squeeze(), + "speaker":torch.tensor([speaker], dtype=torch.long).squeeze(), + "session_id":session_id + + } \ No newline at end of file diff --git a/SPARTA_model/main.py b/SPARTA_model/main.py new file mode 100644 index 0000000..9fb17ea --- /dev/null +++ b/SPARTA_model/main.py @@ -0,0 +1,51 @@ +from config import config +from pytorch_lightning.loggers import WandbLogger +from pytorch_lightning.callbacks import EarlyStopping, ModelCheckpoint +from transformers import AutoTokenizer +import pytorch_lightning as pl +from Trainer import LightningModel +from .models.DAC import DACModel + +if __name__ == '__main__': + + + tokenizer = AutoTokenizer.from_pretrained(pretrained_model_name_or_path=config['model_name']) + logger = WandbLogger( + name="analyze"+"mha-final", + save_dir=config["save_dir"], + project=config["project"], + log_model=True, + ) + early_stopping = EarlyStopping( + monitor=config["monitor"], + min_delta=config["min_delta"], + patience=config['patience'], + ) + checkpoints = ModelCheckpoint( + filepath=config["filepath"], + monitor=config["monitor"], + save_top_k=1 + ) + ## Trainer + trainer = pl.Trainer( + logger=logger, + gpus=[0], + checkpoint_callback=checkpoints, + callbacks=[early_stopping], + default_root_dir="./", + max_epochs=config["epochs"], + precision=config["precision"], + enable_pl_optimizer=False, + automatic_optimization=True, + ) + + model = DACModel(config=config) + lm = LightningModel( + model=model, + tokenizer=tokenizer, + config=config + ) + trainer.fit(lm) + trainer.test(lm) + + diff --git a/SPARTA_model/models/Attention.py b/SPARTA_model/models/Attention.py new file mode 100644 index 0000000..913f9bf --- /dev/null +++ b/SPARTA_model/models/Attention.py @@ -0,0 +1,114 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn + + +class AttentionModel(nn.Module): + """ + Attention block to pay attention to dialouge history, this is multihead attention mechanism if num_heads = 1, it will be + context-context dot product attention. + + Parameters: + hidden_size: What is size of input vector + num_heads: Number of heads we want, embedding size should be divisible by num_heads + need_weights: Whether we want to project the key, query and value vectors or not + + """ + def __init__(self, hidden_size:int=768, num_heads:int=1, need_weights:bool=True)->None: + super(AttentionModel, self).__init__() + + assert hidden_size%num_heads==0, "hidden size should be divisible by nums of heads" + + self.num_heads = num_heads + self.hidden_size = hidden_size + self.head_size = hidden_size//num_heads + self.need_weights = need_weights + + # projection weights + self.k = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + self.q = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + self.v = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + self.o = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + + # no scalong as of now + + + + def forward(self, memory:torch.Tensor, current_utterance:torch.Tensor, attention_mask:torch.Tensor=None)->tuple: + """ + forward function of MHA which takes following argumennts + Arguments: + memory: memory in which previous utterances representations are stored, memory.shape = [window_size, embedding_size] + current_utterance: current utterance repsentation , current_utterance.shape = [1, embedding_size] + attention_mask: attention vector for keys to avoid paying attention to pad tokens + + Returns: attention maps and contextualized embedding as tuple + + Note: Since this will be applied to to memory and single utterance at a time + + Convert the memory and current utterance as key query vector + key: keys to compute attention weights, key.shape = [bs, k_len, embedding_size] + query: query for which we need context vector, query.shape = [bs, q_len, embedding_size] + value: values to get contextualized query, value.shape = [bs, v_len, embedding_size] + + """ + + # treat memory and current_utterance as key, value and query + key = memory.unsqueeze(0) # [1, memory_size, hidden_size] + query = current_utterance.unsqueeze(0) # [1, 1, hidden_size] + value = memory.unsqueeze(0) # [1, memory_size, dden_size] + + batch_size = key.shape[0] + + + + if self.need_weights: + key = self.k(key) + query = self.q(query) + value = self.v(value) + + # divide the key, qeury and value into heads + # key.shape, query.shape, value.shape = [bs, _len, embedding_size] + K = key.view(batch_size, -1, self.num_heads, self.head_size).permute(0, 2, 1, 3) + Q = query.view(batch_size, -1, self.num_heads, self.head_size).permute(0, 2, 1, 3) + V = value.view(batch_size, -1, self.num_heads, self.head_size).permute(0, 2, 1, 3) + # K.shape, Q.shape, V.shape = [bs, num_heads, _len, head_size] + + + # compute the attention weights + weights = torch.matmul(Q, K.permute(0, 1, 3, 2)) + # weights.shape = [bs, num_heads, q_len, k_len] + + + ##[4, 12, 1, 512] to [4, 1, 1, 512] + if attention_mask is not None: + # fill the masked position with small values (tends to zero) in order to pay zero attention + attention_mask = attention_mask.unsqueeze(1).unsqueeze(1) + weights = weights.masked_fill(attention_mask == 0, -1e10) + + # apply the softmax over attention weights to normalize it + attention = torch.softmax(weights, dim=-1) + # attention.shape = [bs, num_heads, q_len, k_len] + + + # weighted sum of values where attention should be used as weights, k and query should be of same length + x = torch.matmul(attention, V) + # x.shape = [bs, num_heads, q_len, head_size] + + + x = x.permute(0, 2, 1, 3).contiguous() + # x.shape = [bs, q_len, num_heads, head_size] + + + x = x.view(batch_size, -1, self.hidden_size) + # x.shape = [bs, q_len, embedding_size] (original size of query) + + + # fed it to linear layer if need_weights is True + if self.need_weights: + x = self.o(x) + + ##print(f'x.shape after linear = {x.shape}') + + return x.squeeze(0), attention + \ No newline at end of file diff --git a/SPARTA_model/models/Classifier.py b/SPARTA_model/models/Classifier.py new file mode 100644 index 0000000..dbf7244 --- /dev/null +++ b/SPARTA_model/models/Classifier.py @@ -0,0 +1,46 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn + + + +class Classifier(nn.Module): + """ + A generic classifier module to classify the data (as feaures) + """ + + def __init__(self, input_size:int=768, dropout:float=0.10, hidden:list=[768, 512, 256, 128, 64], num_classes=2): + super(Classifier, self).__init__() + + self.input_size = input_size + self.dropout = dropout + self.hidden = hidden + self.num_classes = num_classes + + layers = [] + + + for output_size in hidden: + layers += [ + nn.Dropout(p=self.dropout), + nn.Linear(in_features=input_size, out_features=output_size), + nn.LeakyReLU() + ] + input_size = output_size + + layers.append(nn.Linear(in_features=hidden[-1], out_features=num_classes)) + + + self.classifier = nn.Sequential(*layers) + + def forward(self, x): + """ + Forward fuction of generic clasifier, which will take a feacture vector and return a tensor of size num_classes + Args: + x: feature vector to classify, x.shape = [batch_size, feature_size] + Returns: + outptus of size [batch_size, num_classes] + """ + outputs = self.classifier(x) + + return outputs \ No newline at end of file diff --git a/SPARTA_model/models/DAC.py b/SPARTA_model/models/DAC.py new file mode 100644 index 0000000..d25c3f9 --- /dev/null +++ b/SPARTA_model/models/DAC.py @@ -0,0 +1,268 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn +from .Attention import AttentionModel +from .RoBERTa import RepresentationModel +from .SpeakerClassifier import SpeakerClassifierModel +from .MHA import MHAModel +from .Relevance import RelevanceModel +from .GRU import GRUModel +from .Classifier import Classifier + + + +class DACModel(nn.Module): + + """ + Complete architecture of the model, all the modules are assmebled in this. + + """ + + def __init__(self, config:dict)->None: + + super(DACModel, self).__init__() + + + self.config = config + self.model_config = config['model_config'][config['select_model_config']] + print(self.model_config) + + # speaker invariant representation model, attetnion/relevance model and gru block + + # speaker invariant representation model + self.speaker_invariant = RepresentationModel( + model_name=config['model_name'], + hidden_size=config['hidden_size'] + ) + + # speaker-aware model + self.speaker_aware = SpeakerClassifierModel( + config=self.config + ) + # # load the model from checkpoints and then freeze the weights + print("Loading Speaker Classifier from Checkpoint ...") + self.speaker_aware.load_state_dict(torch.load(self.config['speaker_classifier_ckpt_path'])['state_dict']) + + # # freeze the weights of the model if you want + # if self.speaker_aware is not None: + # for param in self.speaker_aware.parameters(): + # param.requires_grad = False + # print("Speaker Classifier Loaded and Freezed !") + + + + # # attention block for speaker invaraint pooler + # if self.model_config['attention_type']=="mha": + self.si_attention = MHAModel( + hidden_size=config['hidden_size'], + num_heads=config['num_heads'], + need_weights=config['need_weights'], + dropout=config['dropout'], + device=self.config['device'], + ) + # # speaker aware attention block + self.sa_attention = MHAModel( + hidden_size=config['hidden_size'], + num_heads=config['num_heads'], + need_weights=config['need_weights'], + dropout=config['dropout'], + device=self.config['device'], + ) + + # elif self.model_config['attention_type']=="rel": + # relevance for speaker invariant pooler + self.si_attention = RelevanceModel( + hidden_size=config['hidden_size'], + need_weights=config['need_weights'], + device=self.config['device'], + ) + # # speaker aware relevance block + self.sa_attention = RelevanceModel( + hidden_size=config['hidden_size'], + need_weights=config['need_weights'], + device=self.config['device'], + ) + + + # gru for speaker invaraint hs + self.si_gru = GRUModel( + input_size=config['hidden_size'], + hidden_size=config['hidden_size'], + num_layers=config['num_layers'], + device=self.config['device'], + + ) + + # speaker aware gru + self.sa_gru = GRUModel( + input_size=config['hidden_size'], + hidden_size=config['hidden_size'], + num_layers=config['num_layers'], + device=self.config['device'], + + ) + + + self.classifier = Classifier( + input_size=self.model_config['dac_inputs']*config['hidden_size'], + dropout=self.config['dropout'], + hidden=self.config['hidden'], + num_classes=self.config['num_dialogue_acts'] + ) + + + def forward(self, + batch, + + # previous_sid:str, + + si_memory:torch.Tensor=None, + sa_memory:torch.Tensor=None, + + sa_global_context:torch.Tensor=None, + si_global_context:torch.Tensor=None, + ): + """ + forward function of dialogue act classifier + Args: + input_ids:input tokens input_ids.shape = [bs, seq_len] + attention_mask: masks for tokens, for pad tokens it will be zero for others it will be 1 + attention.shape = [bs, seq_len] + + si_memory:speaker invariant fixed window size memory that stores the previous utterances (pooler outputs) + si_memory.shape = [window_size, hidden_size] + sa_memory: speaker aware fixed window size memory that stores the prebious utterances (pooler outputs) + sa_memory.shape = [window_size, hidden_size] + + sa_pooler: speaker aware pooler output of current utterance + sa_pooler.shape = [bs, hidden_size] + sa_hidden_states: speaker aware hidden states of current utterance + sa_hidden_states.shape = [bs, seq_len, hidden_size] + + mem_attention_mask:attention mask for memory if we have history less than the window size some of the them + will be masked. + mem_attenion_mask.shape = [windows_size] + sa_global_context: global context (initial hidden state) for speaker aware GRU + sa_global_context.shape = [bs, hidden_size] + si_global_context: global context (initial hidden state) for speaker invariant GRU + sa_global_context.shape = [bs, hidden_size] + Returns: + + """ + + # adjusted during experiment + previous_sid="none" + + batch_size = batch['input_ids'].shape[0] + + + """Speaker Invariant Model""" + + # get the speaker aware representations + si_hidden_states, si_pooler = self.speaker_invariant( + input_ids=batch['input_ids'], + attention_mask=batch['attention_mask'], + ) + + + # feature and attention vector for si attention block + si_attn_x = torch.empty((0, self.config['hidden_size']), device=self.config['device']) + si_attn = torch.empty((0, self.config['window_size']), device=self.config['device']) + + + for i, x in enumerate(zip(si_pooler.detach(), batch['session_id'])): + + si_utterance, current_sid = x[0].unsqueeze(0), x[1] + + xi_attn, attn_i = self.si_attention( + memory=si_memory, + current_utterance=si_utterance, + ) + si_attn_x = torch.vstack((si_attn_x, xi_attn)) + si_attn = torch.vstack((si_attn, attn_i.squeeze(0))) + + # update the memory + si_memory = torch.vstack((si_utterance, si_memory[:-1])) + + si_gru_x, si_global_context = self.si_gru( + embedding=si_hidden_states, + global_context=si_global_context, + attention_mask=batch["attention_mask"], + session_ids=batch['session_id'], + previous_sid=previous_sid + ) + + # """Speaker Aware Model""" + + + # # feature and attention vector for sa attention block + sa_attn_x = torch.empty((0, self.config['hidden_size']), device=self.config['device']) + sa_attn = torch.empty((0, self.config['window_size']), device=self.config['device']) + + + # # for speaker aware we are going to take all speaker aware components including local context, global context and speaker aware invariant representation + + # get speaker invariant representation + sa_hidden_states, sa_pooler, _ = self.speaker_aware( + input_ids=batch['input_ids'], + attention_mask=batch['attention_mask'], + ) + + for i, x in enumerate(zip(sa_pooler.detach(), batch['session_id'])): + + sa_utterance, current_sid = x[0].unsqueeze(0), x[1] + + xa_attn, attn_a = self.sa_attention( + memory=sa_memory, + current_utterance=sa_utterance, + ) + + sa_attn_x = torch.vstack((sa_attn_x, xa_attn)) + sa_attn = torch.vstack((sa_attn, attn_a.squeeze(0))) + + # update the speaker aware memory + sa_memory = torch.vstack((sa_utterance.to(self.config['device']), sa_memory[:-1].to(self.config['device']))) + + sa_gru_x, sa_global_context = self.sa_gru( + embedding=sa_hidden_states, + global_context=sa_global_context, + attention_mask=batch["attention_mask"], + session_ids=batch['session_id'], + previous_sid=previous_sid + ) + + + + # concat all the features vector + features = torch.empty((batch_size, 0), device=self.config['device']) + + + + for i, x in enumerate([si_pooler, si_attn_x, si_gru_x, sa_pooler, sa_attn_x, sa_gru_x]): + if x.shape[0]==batch_size: + features = torch.hstack((features, x)) + + + logits = self.classifier(features) + + + + # return updated memories, attentions and logits + + return { + # memory + "si_memory":si_memory, + "sa_memory":sa_memory, + + "si_global_context":si_global_context, + "sa_global_context":sa_global_context, + + "si_attn":si_attn, + "sa_attn":sa_attn, + + # logits to compute the loss + "logits":logits, + + # "previous_sid":current_sid + } + \ No newline at end of file diff --git a/SPARTA_model/models/GRU.py b/SPARTA_model/models/GRU.py new file mode 100644 index 0000000..dc97d3d --- /dev/null +++ b/SPARTA_model/models/GRU.py @@ -0,0 +1,81 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn + + + + +class GRUModel(nn.Module): + + """ + GRU model that takes the global context along with current utterance representation and gives a context vector + + Parameters: + input_size: size of the input to GRU, which will be contextualized embedding means hidden size + hidden_size: size of the GRU's hidden vectors + num_layer: how many layers should be there in GRU + bidirectional: whether bidirectional or not if True both forwar and backward hidden states will be concatented + + """ + + def __init__(self, input_size:int=768, hidden_size:int=768, num_layers:int=1, bidirectional:bool=False, max_len:int=512, device=torch.device("cpu"))->None: + super(GRUModel, self).__init__() + + self.max_len = max_len + + self.device = device + + self.gru = nn.GRU( + input_size=input_size, + hidden_size=hidden_size, + num_layers=num_layers, + batch_first=True, + bidirectional=bidirectional + ) + + + def forward(self, embedding:torch.Tensor, attention_mask:torch.Tensor, session_ids:list, previous_sid:str, global_context:torch.Tensor=None)->tuple: + """ + forward function of GRUModel which will take contextualized embeddings and global context as input + and will produce next hidden states. + + Arguements: + embedding: contextextualized embeddings (hidden states) coming from representation model [bs, seq_len, hidden_size] + attention_mask: To ignore the pad tokens + global_context: last hidden state from previous utterance [bs, num_direction, hidden_size] + + Returns: + gloabl_context: last hidden state of current utterance + + """ + bs, seq_len, hidden_size = embedding.shape[0], embedding.shape[1], embedding.shape[2] + + outputs = torch.empty((0, hidden_size), device=self.device) + + if global_context is None: + global_context = torch.randn((1, 1, hidden_size), device=self.device) + + + for i, x in enumerate(zip(embedding, attention_mask, session_ids)): + + + + input_, current_sid = x[0], x[2] + + input_len = self.max_len - torch.unique(x[1], return_counts=True)[1][0].item() + if input_len < 1: + input_len = 2 + + # padded tokenz remove mannual with fixed len + _, global_context = self.gru(input=input_[:input_len].unsqueeze(0), hx=global_context.detach()) + + + outputs = torch.vstack((outputs, global_context.squeeze())) + + + return (outputs, global_context.detach()) + + + + + \ No newline at end of file diff --git a/SPARTA_model/models/MHA.py b/SPARTA_model/models/MHA.py new file mode 100644 index 0000000..83e560b --- /dev/null +++ b/SPARTA_model/models/MHA.py @@ -0,0 +1,73 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn + + +class MHAModel(nn.Module): + """ + This is pytorch's implementation of Multihead Attention + Parameters: + embedding_size: What is size of input embedding + num_heads: Number of heads we want, embedding size should be divisible by num_heads + need_weights: Whether we want to project the key, query and value vectors or not + """ + + def __init__(self, hidden_size:int=768, num_heads:int=12, need_weights:bool=True, dropout:float=0.10, device=torch.device("cpu")): + """ + This is pytorch's MHA model + Parameters: + embedding_size: What is size of input embedding + num_heads: Number of heads we want, embedding size should be divisible by num_heads + need_weights: Whether we want to project the key, query and value vectors or not + """ + + super(MHAModel, self).__init__() + + self.device = device + + self.hidden_size = hidden_size + self.num_heads = num_heads + self.need_weights = need_weights + + # multihead attention model + self.mha = nn.MultiheadAttention( + embed_dim=self.hidden_size, + num_heads=self.num_heads, + dropout=dropout, + ) + + def forward(self, memory:torch.Tensor, current_utterance:torch.Tensor, attention_mask:torch.Tensor=None)->tuple: + """ + forward function of MHA which takes following argumennts + Arguments: + memory: memory in which previous utterances representations are stored, memory.shape = [window_size, embedding_size] + current_utterance: current utterance repsentation , current_utterance.shape = [1, embedding_size] + attention_mask: attention vector for keys to avoid paying attention to pad tokens + + Returns: attention maps and contextualized embedding as tuple + + Note: Since this will be applied to to memory and single utterance at a time + + Convert the memory and current utterance as key query vector + key: keys to compute attention weights, key.shape = [bs, k_len, embedding_size] + query: query for which we need context vector, query.shape = [bs, q_len, embedding_size] + value: values to get contextualized query, value.shape = [bs, v_len, embedding_size] + + """ + + # treat memory and current_utterance as key, value and query + key = memory.unsqueeze(0).to(self.device) # [1, memory_size, hidden_size] + query = current_utterance.unsqueeze(0).to(self.device) # [1, 1, hidden_size] + value = memory.unsqueeze(0).to(self.device) # [1, memory_size, dden_size] + + x, attention = self.mha( + key=key, + query=query, + value=value, + need_weights=self.need_weights + ) + + return x.squeeze(0), attention + + + \ No newline at end of file diff --git a/SPARTA_model/models/Relevance.py b/SPARTA_model/models/Relevance.py new file mode 100644 index 0000000..0342f45 --- /dev/null +++ b/SPARTA_model/models/Relevance.py @@ -0,0 +1,99 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn + + +class RelevanceModel(nn.Module): + """ + Relvance model is somehwhat similar to attention but it a scaled by a distance measure + Params: + hidden_size: size of the key, query, values hidden vectors + need_weights: should we apply linear projection or not + """ + + def __init__(self, hidden_size:int=768, need_weights:bool=True, device=torch.device("cpu"))->None: + + super(RelevanceModel, self).__init__() + + self.device = device + + self.hidden_size = hidden_size + self.need_weights = need_weights + + + + # linear layers to linearly project key, query and values and weighted sum of values where attention as weight + self.k = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + self.q = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + self.v = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + self.o = nn.Linear(in_features=hidden_size, out_features=hidden_size, bias=False) + + def distance_fn(self, d:int, T:float=0.20)->torch.Tensor: + """ + Function to compute the distance weights + Args: + d: distance (a single element tensor)from current utterance to that utterance + T: a hyperparameter, to cool down the distance function, T basically controls the distance weight + as well similarity weights. + if T is low max value of distance will be high as well as max-min will be low. I have tested the T + for different range. + T seems good between range 0.10 - 0.30 anything below 0.50 is tolerable + + Returns: distance weight as tensor + + """ + return 1/(torch.exp(torch.tensor([d]))**T) # different functions have been tested but simple inverse was used finally + + + def forward(self, memory:torch.Tensor, current_utterance:torch.Tensor, attention_mask:torch.Tensor=None)->tuple: + """ + forward function of Relvance which takes keys queries and values and returns the weighted sum + Arguments: + memory: memory in which previous utterances representations are stored, memory.shape = [window_size, embedding_size] + current_utterance: current utterance repsentation , current_utterance.shape = [1, embedding_size] + attention_mask: attention over memory, initially it all be set to 0 but as we will fill the memory it will + be unmasked. + + Returns: attention maps and contextualized embedding as tuple + """ + window_size = memory.shape[0] + + # treat memory and current_utterance as key, value and query + key = memory.to(self.device) # [1, memory_size, hidden_size] + query = current_utterance.to(self.device) # [1, 1, hidden_size] + value = memory.to(self.device) # [1, memory_size, dden_size] + + if self.need_weights: + key = self.k(key) + value = self.v(value) + query = self.q(query) + + + + # computing similarity function between memory + similarity = torch.cosine_similarity(key, query) + # similarity.shape = [window_size] + + # get the distance weights with the help of distance function defined + distance = torch.linspace(start=1, end=window_size, steps=window_size, dtype=torch.float).apply_(self.distance_fn).to(self.device) + # distance.shape = [window_size] + + # compute the energy with the help of similarity and distance which is product of these two + energy = similarity*distance + #energy.shape [window_size] + + # mask the not use full context + if attention_mask is not None: + energy = energy.masked_fill(attention_mask == 0, -1e10) + + + # compute the relevance score by applying softmax over energy + relevance = energy.softmax(dim=-1) + # relevance.shape [window_size] + + # get the weighted average of values where relevance is weight + x = torch.matmul(relevance.unsqueeze(0), value) + + return x, relevance + + \ No newline at end of file diff --git a/SPARTA_model/models/RoBERTa.py b/SPARTA_model/models/RoBERTa.py new file mode 100644 index 0000000..d77d430 --- /dev/null +++ b/SPARTA_model/models/RoBERTa.py @@ -0,0 +1,39 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn +from transformers import AutoConfig, AutoModel +class RepresentationModel(nn.Module): + """ + Represention Model to get the contextualized vectors (hidden states) and sentence representation (pooler output) + + Parameters: + model_name: name of pretrained model as feature extractor or represenation model + + + """ + + def __init__(self, model_name:str, hidden_size:int=768)->None: + super(RepresentationModel, self).__init__() + + # feature extractor with default config + self.config = AutoConfig.from_pretrained(pretrained_model_name_or_path=model_name, hidden_size=hidden_size) + self.base = AutoModel.from_pretrained(pretrained_model_name_or_path=model_name, config=self.config) + + def forward(self, input_ids:torch.Tensor, attention_mask:torch.Tensor=None)->tuple: + """ + forward function of representation model which takes input_ids and attention_mask(optional)and gives contextualized + embeddings. + + Arguments: + input_ids:input ids tensor + attention_mask: attention maks, 0 for pad tokens 1 for sequence tokens + + Returns: + hidden states and pooler output in that order + """ + + # feed the input_ids and attention to the representation model + hidden_states, pooler = self.base(input_ids=input_ids, attention_mask=attention_mask) + return hidden_states, pooler + + \ No newline at end of file diff --git a/SPARTA_model/models/SpeakerClassifier.py b/SPARTA_model/models/SpeakerClassifier.py new file mode 100644 index 0000000..479dacb --- /dev/null +++ b/SPARTA_model/models/SpeakerClassifier.py @@ -0,0 +1,46 @@ +import torch +import torch.nn as nn +from typing import Any, NoReturn +from .RoBERTa import RepresentationModel +from .Classifier import Classifier + +class SpeakerClassifierModel(nn.Module): + """Speaker Classifier model, isolated from complete architecture, easy ablation study""" + + def __init__(self, config:dict): + super(SpeakerClassifierModel, self).__init__() + + self.config = config + + self.base = RepresentationModel( + model_name=config['model_name'], + hidden_size=config['hidden_size'] + ) + + self.classifier = Classifier( + input_size=config['hidden_size'], + dropout=config['dropout'], + num_classes=config['num_speakers'] + ) + + def forward(self, input_ids:torch.Tensor, attention_mask:torch.Tensor=None)->tuple: + """ + forward function of Speaker Classifier model + Args: + input_ids:input tokens input_ids.shape = [batch, seq_len] + attention_mask: masks for tokens, for pad tokens it will be zero for others it will be 1 + Returns: a tuple containing hidden states, pooler output and logits + """ + + # get the repsentation + hidden_states, pooler = self.base( + input_ids=input_ids, + attention_mask=attention_mask, + ) + + # classify the speakers + logits = self.classifier(pooler) + + return hidden_states, pooler, logits + + \ No newline at end of file