Package: hepsylex
Hebrew Psychological LexiconsThis is the official code accompanying a paper on theHebrew Psychological Lexiconswas presented at CLPsych 2021.SummaryA large collection of Hebrew psychological lexicons and word listsEasy-to-use Python interface for Hebrew clinical psychology
text analysisUseful for various psychology applications such as detecting emotional state,
well being, relationship quality in conversation, identifying topics (e.g., family, work)
and many moreLexicons were developed through data driven means, and verified by domain experts, clinical psychologists and psychology students, in a process of reconciliation
with three judgesDevelopment and verification relied on a dataset of a total of 872 psychotherapy session transcriptsInitial results of research studies employing this resource confirm its valueUsageFirst, install the package usingpip:pipinstallhepsylexORgitclonehttps://github.com/natalieShapira/HebrewPsychologicalLexicons
pythonsetup.pyinstallThen, in Python, to load the lexicons:fromhepsyleximportLexiconslexicons=Lexicons()and a usable wrapper:fromhepsyleximportLexiconsAPIprint(LexiconsAPI.number_of_words("היא אמרה הוא אמר והיא אמרה היא גם אני אני אני"))# out: 11print(LexiconsAPI.number_of_words_in_lexicon("היא אמרה הוא אמר והיא אמרה היא גם אני אני אני",lexicons.DataDrivenSupervised_WellBeing_NonClinical))# out: 5print(LexiconsAPI.number_of_words_in_lexicon("זה בכלל לא מעניין אותי אני אדיש לזה",lexicons.EmotionalVariety_Calm))# out: 1print(LexiconsAPI.number_of_words_in_lexicon("זה בכלל לא מעניין אותי אני אדיש לזה",lexicons.EmotionalVariety_NotInterested))# out: 2lex1=lexicons.EmotionalVariety_Calmlex2=lexicons.EmotionalVariety_NotInterestedlex3=LexiconsAPI.lexicons_union([lex1,lex2])print(LexiconsAPI.number_of_words_in_lexicon("זה בכלל לא מעניין אותי אני אדיש לזה",lex3))# out: 2print(LexiconsAPI.frequency_of_lexicon("זה בכלל לא מעניין אותי אני אדיש לזה",lex3))# out: 2.5importpandasaspddf_in=pd.read_csv('Resources/For documentation purposes/df_example.csv')df_out=pd.DataFrame()#or df_inLexiconsAPI.df_to_lexicons(df_in,df_out,lexicons,'story','story')df_out.to_csv('./Resources/For documentation purposes/df_example_out.csv',index=False)Publicationshepsylex was also used for Hebrew psychological information extraction in the following academic studies:Using Computerized Text Analysis to Examine Associations Between Linguistic Features and Clients’ Distress during Psychotherapyat JCP 2020Using topic models to identify clients' functioning levels and alliance ruptures in psychotherapyat Psychotherapy 2021If you use hepsylex for an academic publication, we'd appreciate anote.Reference:Title:Hebrew Psychological LexiconsAuthors:  Natalie Shapira, Dana Atzil-Slonim, Daniel Juravski, Moran Baruch, Adar Paz,
Dana Stolowicz-Melman, Tal Alfi-Yogev, Roy Azoulay, Adi Singer, Maayan Revivo,
Chen Dahbash, Limor Dayan, Tamar Naim, Lidar Gez, Boaz Yanai, Adva Maman,
Adam Nadaf, Elinor Sarfati, Amna Baloum, Tal Naor, Ephraim Mosenkis,
Matan Kenigsbuch, Badreya Sarsour, Yarden Elias, Liat Braun, Moria Rubin,
Jany Gelfand Morgenshteyn, Noa Bergwerk, Noam Yosef, Sivan Peled, Coral Avigdor,
Rahav Obercyger, Rachel Mann, Tomer Alper, Inbal Beka, Ori Shapira, Yoav GoldbergAffiliation: Bar-Ilan University, IsraelPublished: Proceedings of the Seventh Workshop on Computational Linguistics and Clinical Psychology, June 2021, Association for Computational Linguistics.CitationIf you make use of this software for research, we would appreciate the following citation:@inproceedings{shapira2021hebrew,title={Hebrew Psychological Lexicons},author={Shapira, Natalie and Atzil-Slonim, Dana and Juravski, Daniel and Baruch, Moran and Stolowicz-Melman, Dana and Paz, Adar and Alfi-Yogev, Tal and Azoulay, Roy and Singer, Adi and Revivo, Maayan and others},booktitle={Proceedings of the Seventh Workshop on Computational Linguistics and Clinical Psychology: Improving Access},pages={55--69},year={2021}}Licensing HighlightsThe code is provided with license (apache 2.0), as is, and without warranties.The data word lists and lexicon is provided with creative commons license CC-BY-SA, as is, and without warranties.