For at least a century, scholars have argued that the supposed lack of education of Molière, the French playwright responsible for seminal masterpieces including Tartuffe and Le Misanthrope, means he could not have written them. Now academics say they have resolved the controversy once and for all, using an algorithm to find that Molière – born Jean-Baptiste Poquelin in 1622– was the author of all his plays.

Molière’s father was one of the appointed furnishers of the royal household, but his son rejected this career for a life on the stage, touring, acting and writing the searing comic plays that would change the face of French theatre. In 1919, French writer Pierre Louÿs claimed that the poet Pierre Corneille had ghostwritten Molière’s most famous works. Since then, questions about Molière’s level of education, his busy schedule and the rarity of surviving manuscripts have kept the debate going.

Florian Cafiero at the Université de Paris and Jean-Baptiste Camps at Université Paris Sciences et Lettres found themselves drawn into the debate by chance. They wanted to motivate students on their computational philology course, and chose to illustrate their linguistic analysis with the example of Molière and Corneille – “honestly, without much idea about what we would find,” said Cafiero.

But after using several methods, they realised their conclusions were radically different to most scholarly opinion and decided to investigate further.

“The late blooming of Molière’s talent, his purported lack of education and culture, his busy agenda, and the lack of manuscripts are among the arguments that triggered a century-long debate. Systematic objections to these assertions have been provided. Yet, the sparsity of available archives has so far prevented the debate from ending,” the pair write in their paper Why Molière Most Likely Did Write His Plays, published on Wednesday in the open-access journal Science Advances.

They analysed the text of a collection of plays from Molière, Pierre Corneille and his brother Thomas, and other major authors of the time, looking at their use of language, rhyme, grammar and word forms.

First, they took on the hypothesis that Molière could have given Pierre Corneille drafts that the latter then worked on, which could be proved if plays signed by Molière shared features such as rhymes, function words, affixes and grammar with those by Corneille. But they found that “all the plays signed by Molière belong to the same cluster, very distinct from Corneille’s plays, whichever the type of feature studied … We thus consider this first hypothesis disproved.”

Next, they tackled the hypothesis that Molière wrote neither the plots nor the verses of his plays, with his reputation as an actor being used to promote them. If this were true, “then all our indicators should show that there is no such thing as Molière’s vocabulary or Molière’s style”. But their algorithm found “a clear-cut separation” between Molière’s plays and all the other authors in the study.

“This substantiates the claim that all of the plays signed by Molière have not been written by Pierre Corneille, nor one of the other authors studied here,” they write.

Cafiero and Camps acknowledge that they have not proved that another ghostwriter did not write all of Molière’s plays. But their research, they say, shows the plays are “very likely written by a single individual”.