public class LexicalStructureElementSimilarity extends VectorBasedStructureElementSimilarity
StructureElement
s. A strict label matching is applied on all
structure elements whose type differs LexicalStructureElement
.
Similarity between LexicalStructureElement
s is estimated by projecting
represented words in a WordSpace and evaluating a Kernel function between
these vectors. By default a dot product provided by a LinearKernel is estimated.
VECTOR_NAME
Constructor and Description |
---|
LexicalStructureElementSimilarity() |
LexicalStructureElementSimilarity(WordspaceI wordspace) |
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowDifferentPOS()
Returns whether the similarity between words having different Part-of-Speech is allowed
or if it must be set to 0
|
void |
setAllowDifferentPOS(boolean allowDifferentPOS)
Sets whether the similarity between words having different Part-of-Speech is allowed
or if it must be set to 0
|
float |
sim(StructureElement sx,
StructureElement sz)
This function measure the similarity between structure elements
|
getCorrespondingVector, getEnrichmentName, getKernel, getSimilarity, getWordspace, setEnrichmentName, setKernel, setWordspace
public LexicalStructureElementSimilarity()
public LexicalStructureElementSimilarity(WordspaceI wordspace) throws NumberFormatException, IOException
matrixPath
- The path of the wordSpace to be loaded.
By default the wordpspace will be of the class Wordpspace
NumberFormatException
IOException
public float sim(StructureElement sx, StructureElement sz)
StructureElementSimilarityI
sx
- the first structure elementsz
- the second structure elementpublic boolean getAllowDifferentPOS()
public void setAllowDifferentPOS(boolean allowDifferentPOS)
allowDifferentPOS
- Copyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.