Example #1
0
 /*
  * 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;
 }
Example #2
0
 /*
  * Gets the total words in between two files
  */
 public int getTotalWords(JaccardScorer js) {
   return words.size() + js.getWordCount() - this.getCommonWords(js);
 }