a) Document similarity: A similarity function is necessary to determine the similarities between old and new cases. The “cases” here are documents. Therefore, some kind of document similarity function is needed. This function will be derivat from a theoretical foundation which is presented in section 2 in detail.