Tagged: Python

Distance matrix obtained from stylo for ELTeC-eng, visualized as a clustermap using seaborn. 6

Dear fellow stylometrists, let’s drop the dendrogram and cherish the distance matrix

The dendrogram is a classic and beloved visualization in stylometry. One could even say that, ever since it was included in the inevitable and unmatched stylo package for R, it has become an icon and metonymy of stylometry itself. The example shown below (Figure 1) illustrates what such a dendrogram looks like, although given its ubiquity, there is almost no...


Follow-up on Simenon and Sentence-Length: Visualization and Hypothesis-Testing

In a conversation about my recent post on sentence length in Georges Simenon’s work, Fotis Jannidis said he thought the post was typical of quite a lot of recent work in digital literary studies in that it is exploratory rather than focused on hypothesis testing. I think this is true and that it is a problem. Exploratory methods, especially when...


Does Shorter Sell Better? Belgian author George Simenon’s use of sentence length

Belgian author Georges Simenon is probably most famous for his crime fiction novels in which police detective Maigret investigates serious crimes and elucidates them with intelligence, empathy, a team of inspectors and acquaintances, and, of course, his tobacco pipe as well as sandwiches and beers brought to his office. Simenon wrote 75 of these Maigret novels (and a certain number...


How good are our texts, really? Quality assurance for literary texts from various sources

by Ulrike Henny and Christof Schöch — this post originally appeared on the CLiGS blog. Some weeks ago, we made our “New Year’s release” of text collections available. We publish the texts in the “CLiGS” group’s GitHub repository called “textbox“ and archive each release on Zenodo where they get a DOI. The texts are encoded in TEI with relatively detailed...


What’s the simplest way of telling verse and prose apart?

Everyone knows that verse and prose are different. Well, there are two exeptions: the first is Monsieur Jourdain in Molière’s play Le bourgois gentilhomme, who only learns about that difference from his “maître de philosophie”. The other exception is the computer, for which both prose and verse are simply and equally strings of characters. Now, if you have nice TEI-encoded texts,...


How to Create Lemmatized (French) Text for Topic Modeling

It would not, some years ago, have occurred to me that anyone would want to reduce literary texts to the following pitiful state: “me avoir tu faire un rapport bien sincère / ne déguiser tu rien de ce que avoir dire mon père / tout mon sens à moi-même en être encor charmer : / il estimer Rodrigue autant que...


Extracting selected text from XML files using lxml in Python

As you can probably guess from the title, this post is a companion piece to another recent post dealing with the creation of simple TEI from HTML in Python (actually, using Python as a wrapper to several Regular Expressions). Once you have created such TEI files, have annotated them more richly by hand or by some other means, or were...


Enrichment by Elimination, or: How to turn HTML into simple TEI using Python

There are lots of full text repositories of literary works out there, be it the venerable Project Gutenberg (founded in 1971, when the internet was just a few dozen computers), a pioneer like Gallica (with increasing amounts of plain text in the 90-95% correct OCR range), or a crowdsourced efforts like Wikisource (with nifty quality indicators). Closer to my geographical...


Topic Modeling French Crime Fiction

For some reason I can’t explain, I have had for many years a very keen interest in crime fiction, especially French crime fiction written since the 1950s, roughly. Some of my favorite authors are Léo Malet, Jean-Patrick Manchette, Sébastien Japrisot and Didier Daeninckx. And it is not for no reason that I was drawn to Mitzi Morris’ stylometric murder mystery...

Search OpenEdition Search

You will be redirected to OpenEdition Search