[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-293670-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-293670-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","llm_annotate-a-python-package-for-annotating-and-analyzing-fiction-characters","LLM_annotate - A Python package for annotating and analyzing fiction characters","","LLM_annotate is a Python package for analyzing the personality and behaviors of fiction characters using large language models. It standardizes workflows for annotating character behaviors in full texts, inferring character traits, and validating annotation and inference quality through a human-in-the-loop GUI. The package provides text chunking, LLM-based annotation, character name disambiguation, quality scoring, and computation of character-level statistics and embeddings. It supports any LLM and is demonstrated with The Simpsons Movie and Pride and Prejudice.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/llm_annotate-a-python-package-for-annotating-and-analyzing-fiction-characters/293670/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/llm_annotate-a-python-package-for-annotating-and-analyzing-fiction-characters/293670.png","ImageObject",300,407,{"name":42,"@type":43},"Anna Hans","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-18","2026-09-17",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What does LLM_annotate do for fiction character analysis?","Question",{"text":63,"@type":64},"LLM_annotate provides standardized workflows to annotate character behaviors, infer character traits, and compute character-level statistics and embeddings using large language models.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does the package validate annotation and inference quality?",{"text":68,"@type":64},"It uses a human-in-the-loop GUI to validate the quality of annotations and inferred character traits.",{"name":70,"@type":61,"acceptedAnswer":71},"What inputs and components does LLM_annotate include?",{"text":72,"@type":64},"It includes functions for text chunking, LLM-based annotation, character name disambiguation, quality scoring, and the computation of character-level statistics and embeddings.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},293670,1789667367,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,110,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":112,"slug":113},8,30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":111,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":108,"preview_page_count":4},5909892332657,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Running head: LLM_ANNOTATE PACKAGE 1  \nLLM_annotate: A Python package for annotating and analyzing fiction characters  \nHannes Rosenbusch ([h.rosenbusch@uva.nl](h.rosenbusch@uva.nl); 0000-0002-4983-3615) Department of Psychological Methods, University of Amsterdam  \nLLM_annotate is a Python package for analyzing the personality of fiction characters with large language models. It standardizes workflows for annotating character behaviors in full texts (e.g. , books/movie scripts) , inferring character traits, and validating annotation/inference quality via a human-in-the-loop GUI. The package includes functions for text chunking, LLM-based annotation, character name disambiguation, quality scoring, and computation of character-level statistics and embeddings. Researchers can use any LLM—commercial, open-source, or custom—for the package’s functionality. Through tutorial examples using The Simpsons Movie and the novel Pride and Prejudice, I demonstrate the usage of the package for efficient and reproducible character analyses.  \nLLM_annotate: A Python package for annotating and analyzing fiction characters  \nThe impact of a story depends on its characters ( Bourrier & Thelwall, 2020 ; Cohen, 2013 ; Raney, 2004 ; Šauperl, 2012; Tchernev, 2022) . Readers might relate to their book’s protagonist, hate the antagonist, or fall in love with a quirky sidekick. Similarly, TV audiences might laugh, cry, emulate, or refuse to spend any more time with the characters on the screen. Accordingly, research from behavioral, aesthetic, and computational disciplines often analyzes character behaviors and attributes (e.g. , Forster, 1985; Gottschall et al. , 2003; Priyatno et al. , 2024; Yuan et al. , 2024; Yu et al. , 2023) . Here, I introduce a small Python package, LLM_annotate, that standardizes the use of LLMs for the purpose of annotating character behaviors and scoring character traits. The package consists of functions to deliver raw annotations, disambiguate character names, collect character-level statistics, and provide a GUI for human-in-the-loop validation. After a brief review of character annotation methods, I will demonstrate the use of the package, point out best practices, and discuss shortcomings and possible extensions.  \nAnnotating character behaviors and traits  \nResearchers annotate behaviors and traits of fictional characters to analyze historical developments ( Underwood et al. , 2018) , predict authorship (e.g. , Wolyn & Simske, 2023) , review societal norms (e.g. , Abbasi et al. , 2023) , investigate the psychology of authors and readers (e.g. , Kokesh & Sternadori, 2015 ; Mishara, 2010) , and map reader preferences to book contents (e.g. , Johnson et al. , 1984 ; Krakowiak, 2015) . The practice of analyzing character attributes has become so central in literary studies that researchers have started building character databases for books and movie scripts (Sang et al. , 2022; Yu et al. , 2023) .  \nLLM_ANNOTATE PACKAGE  \n2  \nCommonly, researchers are interested in a set of attributes or behaviors among characters in a book or other media piece, and thus have human annotators generate the desired annotations ( Douglas, 2008; Faber & Mayer, 2009; Hesse et al. , 2005) . Given the high cost of such annotations, computational researchers have developed a range of methods to (partially) automate this process. For instance, past work relied on predefined word lists to analyze character attributes (e.g. , Tausczik & Pennebaker, 2010 ; Mohammad & Turney, 2013) . Flekova & Gurevych (2015) used such lists to predict personality traits of fictional characters with above chance accuracy. Other researchers have used extensions of this method by factoring in context for the word occurrences (e.g. , is a relevant verb performed by the character or towards the character; Bamman et al. , 2013 ; 2014) .  \nWhile word-level features and count-based analyses have been of great use to literary researchers, they are limited in the types of annot","cbCaij7Exu8GRwAl","https://ap.wps.com/l/cbCaij7Exu8GRwAl","pdf",1358014,16,"English","# Annotating character behaviors and traits\n## LLM_annotate package overview\n## Existing approaches and their limitations\n## Alternative: neural models and LLM-based annotation","[{\"question\":\"What does LLM_annotate do for fiction character analysis?\",\"answer\":\"LLM_annotate provides standardized workflows to annotate character behaviors, infer character traits, and compute character-level statistics and embeddings using large language models.\"},{\"question\":\"How does the package validate annotation and inference quality?\",\"answer\":\"It uses a human-in-the-loop GUI to validate the quality of annotations and inferred character traits.\"},{\"question\":\"What inputs and components does LLM_annotate include?\",\"answer\":\"It includes functions for text chunking, LLM-based annotation, character name disambiguation, quality scoring, and the computation of character-level statistics and embeddings.\"}]","LLM_annotate - A Python package for annotating and analyzing fiction characters | PDF"]