Measuring text similarity with Cosine Similarity measure using Java 8