Erna Daniati, Aji Prasetya Wibawa, Wahyu Sakti Gunawan Irianto, Andrew Nafalski
Story structure and literary meaning, at least in fairytales, are very much focused on the relationships between individual characters that reflect or communicate moral morals and self-hood. However, manual inspection and analysis of such dependencies remains subjective and arduous; it requires automation through computational methods. In this study, we introduce a novel method for automatic detection of character relations in Hans Christian Andersen’s fairy tales by the application of Dependency Attention-Aware Graph Convolutional Network (DAGCN)) and Bidirectional LSTM (Bi-LSTM). DAGCN encodes structural relationships using the syntactic dependency graph of a narrative, while Bi-LSTM optimizes both local and global context by encoding narrative sequence. Attention: We enhance the DAGCN by focusing on the more informative parts of dependency graph. Our model reached an F1 score of 92.1% on the Andersen corpus, surpassing the GCN-only and Bi-LSTM-only baselines. It could recover common types of relationships (e.g., love, conflict, friendship, and family) with high fidelity but not for less frequent and/or more subtle ones. An error analysis indicated that failure to capture context and rare character interactions were the leading causes of misclassification; these findings are clues for system improvement. Such a structure, more scalable, automatic and reliable than manual efforts, can be employed to analyze literature. Aside from Andersen, it proposes a way of treating character relations across literature. We envision future work on this that will extend it more fully to cover context, as well as be developed for multilingual/multimodal data-sets; in its wide applicability to computational narrative analysis we see it pushing forwards both the field of literary studies and AI more generally. © 2026, Politeknik Negeri Padang. All rights reserved.
Department of Electrical and Informatics, Universitas Negeri Malang, East Java, Malang, Indonesia; Electrical Engineering, University of South Australia, Mawson Lakes Campus, UniSA, Mawson Lakes, SA, Australia