public class CompositionalNodeSimilarityDilation extends CompositionalNodeSimilarity implements Manipulator
enrichmentName
VECTOR_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, sim
getAllowDifferentPOS, getIgnorePosInLemmaMatches, setAllowDifferentPOS, setIgnorePosInLemmaMatches
getCorrespondingVector, getKernel, getSimilarity, getWordspace, setKernel, setWordspace
public 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 loadedNumberFormatException
IOException
public 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.FileNotFoundException
IOException
NumberFormatException
public String getRepresentationToBeEnriched()
public void setRepresentationToBeEnriched(String representationToBeEnriched)
representationToBeEnriched
- the representationToBeEnriched to setpublic float getScore(CompositionalStructureElement csx, CompositionalStructureElement csz)
getScore
in class CompositionalNodeSimilarity
public 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 CompositionalNodeSimilarity
head
- modifier
- ws
- the StructureElementSimilarityWordSpace used to retrieve the
vector representations of head and modifiers.public void manipulate(Example example)
manipulate
in interface Manipulator
Copyright © 2018 Semantic Analytics Group @ Uniroma2. All rights reserved.