コード例 #1
0
ファイル: JaccardScorer.java プロジェクト: lyhong508/DStc
 /*
  * 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;
 }
コード例 #2
0
ファイル: JaccardScorer.java プロジェクト: lyhong508/DStc
 /*
  * Gets the total words in between two files
  */
 public int getTotalWords(JaccardScorer js) {
   return words.size() + js.getWordCount() - this.getCommonWords(js);
 }