Skip to content

AutoDesc Reloaded

A long, long time ago, in a codebase far, far away, I wrote some code to generate automatic descriptions of Wikidata items for Reasonator. This turned out to be very useful, and I forked the code into its own tool/API, AutoDesc. Many of my tools, including the popular Mix-n-match, use AutoDesc under the hood.

As the original Reasonator code was in JavaScript, I decided to try a node.js implementation.

This worked reasonably well for a while, but bitrot and changes to the Toolforge ecosystem made it more unreliable over time, and the node.js version is quite deprecated now, even on Toolforge.

A few weeks ago, AutoDesc started to fail completely, that is, it could not be used any longer. Rather than patching the failing code into a new node.js version, I decided to stabelise it by converting it to Python. And by converting, I mean open a text editor and run regular expression search/replace to change JavaScript into Python. (I did look around for code that can do that automatically, but not much joy).

I am happy to report that, for some days now, the new Python code is running on Toolforge. It only does short descriptions for now, but at least you can get something from it. The code for the long descriptions is partially ready, but does not actually work yet. I will continue on this as I have time, and I would welcome any help in the form of pull requests.