Authorship Identification of 18th Century Letters using Wolfram Machine Learning Classifier

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration showcases Wolfram Language capabilities in identifying authorship from real-life letters written by three very famous historical personalities who lived during the same period in 18th century Austria and also knew each other quite well. These are Empress Maria Theresa, her son and co-regent Emperor Joseph II and the genial musician Wolfgang Amadeus Mozart. Machine learning is applied to the original German texts reported in the Initialization section. In the Manipulate panel you can switch between reading the English translation and the original German texts used as training samples and snippets. By clicking on the button "English translation with notes" you can also learn some more details about the text content and its authorship. In the training samples only the effective real authorship is reported, as these texts are chosen to train the machine learning (ML) classifier. For snippet texts, both the real and ML predictions are reported.


You can see that the ML classifier works quite well in authorship attribution, although some care is needed when choosing the writing style based on the kind of content, in order to avoid misleading authorship attributions. For instance, in Snippet 4, the writing styles of Empress Maria Theresa and her son Joseph II are easily confounded, since the chosen excerpt is quite short and both authors have a very formal and similar way of expressing their thoughts, as they were both educated to be monarchs. In Snippet 8, the actual author is Mozart whereas the ML prediction gives Emperor Joseph II: this is probably related to the typology of the chosen text, actually a quite detailed report of a busy day at the opera, similar to others authored by Joseph II himself about his daily routine, or maybe simply because Mozart became more literate after living almost 10 years in Vienna close to the Emperor and his Court.


Contributed by: Jessica Alfonsi (January 2024)
(Padova, Italy)
Open content licensed under CC BY-NC-SA



Letter excerpts authored by Mozart and Empress Maria Theresa in German language were taken from [1, 2].

Emperor Joseph II 's letter excerpts alongside others from his mother Maria Theresa were taken from the classical biography Joseph II by Francois Fejto's.

English translations from German were carried out by the author.


[1] Anzeige. Projekt Gutenberg-DE. (Dec 21, 2023)

[2] Mozarts Briefe. Projekt Gutenberg-DE. (Dec 21, 2023)

Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.