this.results = results;
}
private JaccardStore computeJaccardSimilarity() {
// compute jaccard similarity for each pair of results
JaccardStore scores = new JaccardStore();
for (int j = 0; j < results.size(); j++) {
TResult doc1 = results.get(j);
for (int k = j + 1; k < results.size(); k++) {
TResult doc2 = results.get(k);
double jaccardSim = JaccardStore.computeJaccardSimilarity(doc1.getText(), doc2.getText());
scores.setScore(doc1.getId(), doc2.getId(), jaccardSim);
}
}
return scores;
}