Approaches to Analysing Historical Newspapers Using LLMs
Authors: Filip Dobranić, Tina Munda, Oliver Pejić, Vojko Gorjanc, Uroš Šmajdek, David Bordon, Jakob Lenardič, Tjaša Konovšek, Kristina Pahor de Maiti Tekavčič, Ciril Bohak, Darja Fišer
Organizations: Institute of Contemporary History, Privoz 11, SI-1000 Ljubljana · Faculty of Arts, University of Ljubljana, Aškerčeva 2, SI-1000 Ljubljana · Faculty of Computer Science, University of Ljubljana, Večna pot 113, SI-1000 Ljubljana
This study presents a computational analysis of the Slovene historical newspapers Slovenec and Slovenski narod from the sPeriodika corpus, combining topic modelling, large language model (LLM)-based aspect-level sentiment analysis, entity-graph visualisation, and qualitative discourse analysis to examine how collective identities, political orientations, and national belonging were represented in public discourse at the turn of the twentieth century. Using BERTopic, we identify major thematic patterns and show both shared concerns and clear ideological differences between the two newspapers, reflecting their conservative-Catholic and liberal-progressive orientations. We further evaluate four instruction-following LLMs for targeted sentiment classification in OCR-degraded historical Slovene and select the Slovene-adapted GaMS3-12B-Instruct model as the most suitable for large-scale application, while also documenting important limitations, particularly its stronger performance on neutral sentiment than on positive or negative sentiment. Applied at dataset scale, the model reveals meaningful variation in the portrayal of collective identities, with some groups appearing predominantly in neutral descriptive contexts and others more often in evaluative or conflict-related discourse. We then create NER graphs to explore the relationships between collective identities and places. We apply a mixed methods approach to analyse the named entity graphs, combining quantitative network analysis with critical discourse analysis. The investigation focuses on the emergence and development of intertwined historical political and socionomic identities. Overall, the study demonstrates the value of combining scalable computational methods with critical interpretation to support digital humanities research on noisy historical newspaper data.
Figures & tables
Tokens
Paragraphs
Issues
Slovenski narod
183,294,799
4,404,531
14,039
Slovenec
137,506,802
3,158,842
10,897
Table 1: Corpus size.
Theme
Slovenec
Slovenski Narod
Abs.
Rel.
Rel.
No. of
Abs.
Rel.
Rel.
No. of
paras
paras
ident.
ident.
paras
paras
ident.
ident.
Advertisements and announcements
15521
5.22%
4.67%
28
23522
6.97%
4.56%
25
Art and culture
6270
2.11%
4.75%
23
7730
2.29%
4.64%
23
Countries and nationalities
38879
13.08%
5.96%
28
35150
10.41%
4.8%
27
Criminality and natural disasters
13401
4.51%
4.65%
27
14012
4.15%
4.0%
3
Table 2: List of themes with absolute and relative paragraph counts, relative share of collective identity mentions and no. of different identities mentioned.
Model
Acc
M-F1
W-F1
F1 −
F1 0
F1 +
GaMS3
0.695
0.538
0.708
0.488
0.794
0.343
Gemma3
0.679
0.555
0.701
0.477
0.776
0.411
LLaMA 3.1
0.485
0.459
0.515
0.406
0.545
0.427
DeepSeek-R1
0.253
0.244
0.260
0.269
0.267
0.197
Table 3: Cross-model performance on mention-level sentiment classification (N=371). M-F1 denotes macro-averaged F1; W-F1 denotes support-weighted F1. Class-specific scores are reported as F1_-, F1_0, F1_+, corresponding to NEG, NEU, and POS sentiment labels.
Class
P
R
F1
Support
Positive (+)
0.400
0.300
0.343
40
Neutral (0)
0.858
0.739
0.794
287
Negative (-)
0.351
0.750
0.478
44
Macro avg
0.536
0.596
0.538
371
Weighted avg
0.749
0.692
0.708
371
Table 4: Performance of GaMS3 on the manually annotated sample for mention-level sentiment classification for the full dataset (Total). Metrics are: precision (P), recall (R), F1-score (F1). Macro and weighted averages are computed across classes.
Figure 1: Sentiment class composition (+/-/0) for the five most frequent collective identities in the dataset. For each identity, two stacked bars show the predicted class proportions in Slovenec , and Slovenski narod .
Figure 2: Most neutral collective identities. Top 10 collective identities with the highest proportion of neutral sentiment in Slovenec and Slovenski narod . Only identities with min. 50 mentions in each newspaper are included. Identities are ordered by the mean neutral proportion across the two newspapers. Bars represent the proportion of mentions classified as neutral by the model.
Figure 3: Most non-neutral collective identities. Top 10 collective identities with the highest proportion of non-neutral sentiment (positive or negative) in Slovenec and Slovenski narod . Only identities with min. 50 mentions in each newspaper are included. Identities are ordered by the mean non-neutral proportion across the two newspapers. Bars represent the combined proportion of positive and negative mentions.
Figure 4: Topic (red), identity (green), sentiment (yellow), and location (purple) graph for Slovenski narod . The size of the nodes is the same except for identities, where it correlates to that identity’s relative non-neutral sentiment.
Figure 6: A comparison of Slovenec and Slovenski narod paragraph co-occurrences for the Advertisements and announcements theme. Topics are shown in red, identities green, sentiment yellow, and locations purple. The size of the nodes is the same except for identities, where it correlates to that identity’s relative non-neutral sentiment.
Department of Physics and Chemistry, University of Palermo, Palermo, Italy · Institute for Cross-Disciplinary Physics and Complex Systems (IFISC), UIB-CSIC, Palma de Mallorca, Spain