Automating the anonymisation of textual corpora