/* * Gets common words between the sets in two files */ public int getCommonWords(JaccardScorer js) { int count = 0; for (String s : js.getWordsSet()) { if (words.contains(s)) count++; } return count; }
/* * Gets the total words in between two files */ public int getTotalWords(JaccardScorer js) { return words.size() + js.getWordCount() - this.getCommonWords(js); }