|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimilarity.VSM
The template class for implementing Vector Space Method Similarity
Field Summary | |
protected int |
N
The number of documents in the collection |
protected Thesaurus |
thesauri
The collection to be queried |
Constructor Summary | |
VSM(Thesaurus thesauri)
|
Method Summary | |
protected abstract double |
firstNorm(java.util.List d1)
The normalization for the first document |
protected abstract double |
firstValue(Term term)
The tf * idf according to scheme for the first document; returning one element of Sigma |
protected abstract double |
secondNorm(java.util.List d2)
The normalization for the second document |
protected abstract double |
secondValue(Term term)
The tf * idf according to scheme for the second document; returning one element of Sigma |
double |
similarity(java.util.List d1,
java.util.List d2)
Compute the similarity of two documents. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int N
protected Thesaurus thesauri
Constructor Detail |
public VSM(Thesaurus thesauri)
Method Detail |
public double similarity(java.util.List d1, java.util.List d2)
d1
- first documetnd2
- second document
protected abstract double firstValue(Term term)
term
- the for which the value will be computed
protected abstract double secondValue(Term term)
term
- the for which the value will be computed
protected abstract double firstNorm(java.util.List d1)
d1
- the document to be normalized
protected abstract double secondNorm(java.util.List d2)
d2
- the document to be normalized
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |