The Linguistic Inquiry and Word Count (LIWC) is a text analysis program widely used in psychological, linguistic, and social research. Developed by James W. Pennebaker, Roger J. Booth, and Martha E. Francis, LIWC is particularly valuable for exploring how language reflects psychological states, personality traits, and social behaviors. It uses a lexicon-based approach to quantifying different concepts from text - it works by counting the frequencies of words belonging to various word categories (e.g., personal pronouns, negative emotion, social relationships), and calculating the proportion of text related to each category. For more information as well as references to papers and studies applying LIWC, see here: https://www.liwc.app/
Although LIWC can be purchased as a software, older versions of its dictionaries can be found online, and they can be processed using R. The following code provides instructions on how to process text using the LIWC dictionary, as well using customized dictionaries (to pick up on words belonging to concepts not included in LIWC). However, it is important to note that custom dictionaries are not validated, whereas most LIWC dictionaries are.
R CODE: LIWC.R
Related LIWC dictionary: LIWC2007Dictionary.csv