public class CompositionalNodeSimilarityDilation extends CompositionalNodeSimilarity implements Manipulator
enrichmentNameVECTOR_NAME| Constructor and Description |
|---|
CompositionalNodeSimilarityDilation()
Default constructor, used only for JSON serialization/deserialization
purposes.
|
CompositionalNodeSimilarityDilation(WordspaceI wordspace)
Constructor that enable to specify the wordspace path.
|
CompositionalNodeSimilarityDilation(WordspaceI wordspace,
boolean posRestriction,
boolean syntacticRestriction)
Constructor that enable to specify the wordspace path.
|
| Modifier and Type | Method and Description |
|---|---|
Vector |
getCompositionalInformationFor(LexicalStructureElement head,
LexicalStructureElement modifier)
This method takes in input two LexicalStructureElement representing a
head and a modifier.
|
String |
getRepresentationToBeEnriched() |
float |
getScore(CompositionalStructureElement csx,
CompositionalStructureElement csz) |
void |
manipulate(Example example) |
void |
setRepresentationToBeEnriched(String representationToBeEnriched) |
getEnrichmentName, isPosRestriction, isSyntacticRestriction, setEnrichmentName, setPosRestriction, setSyntacticRestriction, simgetAllowDifferentPOS, setAllowDifferentPOSgetCorrespondingVector, getKernel, getSimilarity, getWordspace, setKernel, setWordspacepublic CompositionalNodeSimilarityDilation()
public CompositionalNodeSimilarityDilation(WordspaceI wordspace) throws NumberFormatException, IOException
getDefaultKernel method. posRestriction
parameter is set to true. syntacticRestriction parameter is
set to false.matrixPath - The path of the Word Space to be loadedNumberFormatExceptionIOExceptionpublic CompositionalNodeSimilarityDilation(WordspaceI wordspace, boolean posRestriction, boolean syntacticRestriction) throws NumberFormatException, IOException
getDefaultKernel method.matrixPath - The path of the Word Space to be loaded.posRestriction - if true, two nodes will be compared only if heads and
modifiers of these nodes will match.syntacticRestriction - if true, two nodes will be compared only if the dependency
relation of these will match.FileNotFoundExceptionIOExceptionNumberFormatExceptionpublic String getRepresentationToBeEnriched()
public void setRepresentationToBeEnriched(String representationToBeEnriched)
representationToBeEnriched - the representationToBeEnriched to setpublic float getScore(CompositionalStructureElement csx, CompositionalStructureElement csz)
getScore in class CompositionalNodeSimilaritypublic Vector getCompositionalInformationFor(LexicalStructureElement head, LexicalStructureElement modifier)
VECTOR_NAME, containing the
dilation of the two vector representations of the head and modifier. In
case of missing head, the resulting composition is obtained by copying
the modifier in the head. In case of missing modifier, the resulting
composition is obtained by copying the head in the modifier. In case of
missing head and modifier, the method returns null.getCompositionalInformationFor in class CompositionalNodeSimilarityhead - modifier - ws - the StructureElementSimilarityWordSpace used to retrieve the
vector representations of head and modifiers.public void manipulate(Example example)
manipulate in interface ManipulatorCopyright © 2015 Semantic Analytics Group @ Uniroma2. All rights reserved.