After being pointed to it in this Economist.com story, I downloaded a copy of a fascinating new paper on the use of data compression algorithms for allowing a machine to quickly determe aspects of a document like language and authorship. Here’s a copy of the abstract, available here.
In this Letter we present a very general method for extracting information from a generic string of characters, e.g., a text, a DNA sequence, or a time series. Based on data-compression techniques, its key point is the computation of a suitable measure of the remoteness of two bodies of knowledge. We present the implementation of the method to linguistic motivated problems, featuring highly accurate results for language recognition, authorship attribution, and language classification.
In a nutshell, the paper’s authors have come up with a way to measure the informational “distance” (or “relative entropy”) between two text files, a known exemplar file A and an unknown input file X. For example, using their technique you could take 10 different lengthy texts in 10 different languages as exemplars (A1, A2, A3,…, A10). In order to determine the language of an unknown input text X, you would then compare X in turn to each of the exemplar texts, calculating the “distance” between each exemplar and the unknown input. The exemplar that was the shortest distance to the input text would be the one written in the same language. Of course, this assumes that X was written in one of the 10 languages used for the exemplars. If it wasn’t, then it would identify most closely with the text whose language was the most related to its own, which is where things get really interesting from a linguistics standpoint.
I’ll let you use your imagination to figure out how they applied this to determining the authorship of texts written in the same language–it works pretty much the same way as outlined above. The authors were able to get amazing accuracy in determining whether or not texts were written by a certain author. And by applying the technique to 52 copies of a document translated into 52 of the world’s languages, they came up with pretty much the same language family groupings that linguists have identified.