Transform input files into tf-idf vectors, then compute the cosine similarity between them.