Cilibrasi and Vit´ anyi (2005), while plagiarism detection of students assign- 79 ments has been succesfully carried out by Chen et al. (2004). 80 

A modified version of NCD based on the extraction of dictionaries has 81 been first defined by Macedonas et al. (2008). The advantages of using 82 dictionary-based methods have been then studied by Cerra and Datcu (2012), 83 in which the authors define a Fast Compression Distance (FCD), and succes- 84 fully apply it to image analysis. The algorithm can be used for texts analysis 85 as follows. 86 

First of all, all special characters such as punctuation marks are removed 87 from a string x , which is subsequently tokenized in a set of words W x . The 88 sequence of tokens is analysed by the encoding algorithm of the Lempel- 89 Ziv-Welch (LZW) compressor (Welch, 1984), with the difference that words 90 rather than characters are taken into account. The algorithm initializes the 91 dictionary D ( x ) with all the words W x . Then the string x is scanned for 92 successively longer sequences of words in D ( x ) until a mismatch in D ( x ) takes 93 place; at this point the code for the longest pattern p in the dictionary is sent 94 to output, and the new string ( p + the last word which caused a mismatch) 95 is added to D ( x ). The last input word is then used as the next starting 96 point: in this way, successively longer sequences of words are registered in 97 the dictionary and made available for subsequent encoding, with no repeated 98 entries in D ( x ). An example for the encoding of the string ”TO BE OR 99 NOT TO BE OR NOT TO BE OR WHAT” after tokenization is reported 100 in Table 1. It helps to remark that the output of the simulated compression 101 

