public abstract class VectorBasedStructureElementSimilarity extends Object implements StructureElementSimilarityI
| Modifier and Type | Field and Description |
|---|---|
static String |
VECTOR_NAME |
| Constructor and Description |
|---|
VectorBasedStructureElementSimilarity() |
| Modifier and Type | Method and Description |
|---|---|
protected Vector |
getCorrespondingVector(StructureElement element)
Returns the vector associated to
element. |
String |
getEnrichmentName()
Returns the identifier of the vectors associated to
a StructureElement during the manipulation operation performed
by a Manipulator (i.e.
|
Kernel |
getKernel()
Returns the kernel used in comparing two vectors
|
protected float |
getSimilarity(Vector vector1,
Vector vector2)
Returns the similarity between
vector1 and vector2
computed using the kernel function |
WordspaceI |
getWordspace()
Returns the wordspace from which the vectors associated to a word must be retrieved
|
void |
setEnrichmentName(String enrichmentName)
Sets the identifier of the vectors associated to
a StructureElement during the manipulation operation performed
by a Manipulator (i.e.
|
void |
setKernel(Kernel kernel)
Sets the kernel to be used in comparing two vectors
|
void |
setWordspace(WordspaceI wordspace)
Sets the wordspace from which the vectors associated to a word must be retrieved
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsimpublic static final String VECTOR_NAME
public VectorBasedStructureElementSimilarity()
public Kernel getKernel()
public void setKernel(Kernel kernel)
NOTE: the kernel cache mechanism cannot be enabled. Thus the
cache is automatically disabled to kernel
kernel - the kernel to be used in comparing two vectorspublic WordspaceI getWordspace()
public void setWordspace(WordspaceI wordspace)
wordspace - the wordspace from which the vectors associated to a word must be retrievedpublic String getEnrichmentName()
public void setEnrichmentName(String enrichmentName)
enrichmentName - the enrichmentName to setprotected Vector getCorrespondingVector(StructureElement element)
element. It firstly tries to
check whether a vector as been attached as additional information to element.
If no vector has been attached it retrieves the vector associated to the textual representation
of element (applying element.getTextFromData()) in the wordspace.element - the structure element whose corresponding vector must be retrievedelementprotected float getSimilarity(Vector vector1, Vector vector2)
vector1 and vector2
computed using the kernel functionvector1 - the first vector to be comparedvector2 - the second vector to be comparedvector1 and vector2Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.