The idea for this book was born from a conversation with Federico Antonini – a mate from my ISIA days – in the well-known S.Calisto square in Rome. The topic was the notion of Hapax, something unknown to me back then. A hapax is a key term in a text which occurs only once. After that conversation, I dug a bit more into the topic and discovered that many authors were very conscious about counting terms in their production.
After that conversation, I started to work on a “hapaxator” script, and I showed it to Federico. It is indeed a very simple script, but back then I was moving my first steps into programming and it took me a while to achieve the right results. A long string is loaded from a plain text file – we chose the Manzoni’s Promessi Sposi –, it is then subdivided into words (easier to say than...), and then using a dictionary data type, each occurrence of each word was counted. The script would then sort the dictionary according to the amount of occurrences and recreate the long string. This long string was typeset in a book using InDesign. The punctuation was treated similarly in a parallel process and then appended at the end of the volume. Federico took good care of the cover and the layout. She explained me that a suitably programmed computer can read a novel in a few minutes and record the list of all the words contained in the text, in order of frequency. «That way I can have an already completed reading at hand» Lotaria says «with an incalculable saving of time. What is the reading of a text, in fact, except the recording of certain thematic recurrences, certain insistences of forms and meanings?»
Italo Calvino, If on a winter’s night a traveler