Agency — the capacity to set goals and act upon them—is a cornerstone of human cognition and social life. Until recently, researchers studying how agency is expressed in language relied mostly on dictionary word-count approaches. While simple, these methods often miss the nuance of context, polysemy, and the intensity or direction of agency.
BERTAgent is our novel solution: a Python package built on transformer-based language models, fine-tuned on large lexicographic datasets and validated against human-coded judgments. Unlike traditional tools, BERTAgent detects agency at the sentence level with sensitivity to both meaning and context. It captures gradations of agency (from passive to highly agentic) and handles complex cases such as negation.
We provide:
- A peer-reviewed publication describing the seven-stage development protocol and validation studies.
- Nikadon, J., Suitner, C., Erseghe, T., Džanko, L., & Formanowicz, M. (2025). BERTAgent: The development of a novel tool to quantify agency in textual data. Journal of Experimental Psychology: General, 154(7), 1855–1877. https://doi.org/10.1037/xge0001740
- A Python package available via PyPI, with full documentation and source code.
- A Jupyter notebook tutorial guiding users through installation, data preparation, and analysis workflows
BERTAgent is both a state-of-the-art tool for analyzing agency in texts and a blueprint for building future tools to capture other psychological constructs.
Referenced projects: