Package it.uniroma1.lcl.babelnet
Class BabelSynsetRelation
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.BabelSynsetRelation
-
- All Implemented Interfaces:
SynsetRelation
- Direct Known Subclasses:
BabelSynsetIDRelation
public class BabelSynsetRelation extends Object implements SynsetRelation
Class that models a relation to a synset ID in the BabelNet network.- Author:
- navigli, vannella
-
-
Constructor Summary
Constructors Constructor Description BabelSynsetRelation(it.uniroma1.lcl.jlt.util.Language language, BabelPointer pointer, String target)
Builds a synset relationBabelSynsetRelation(it.uniroma1.lcl.jlt.util.Language language, BabelPointer pointer, String target, double weight, double normalizedWeight)
Deprecated.For removal.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object obj)
static BabelSynsetRelation
fromString(String edge)
Creates a new instance ofBabelSynsetRelation
from an input record in the same format as found inBabelNetIndexField.RELATION
BabelSynsetID
getBabelSynsetIDTarget()
Gets the target as aBabelSynsetID
it.uniroma1.lcl.jlt.util.Language
getLanguage()
Returns the relation languagedouble
getNormalizedWeight()
Deprecated.For removal.BabelPointer
getPointer()
Returns the relation typeString
getTarget()
Gets the target ID.double
getWeight()
Deprecated.For removal.int
hashCode()
void
setNormalizedWeight(double normalizedWeight)
Deprecated.For removal.void
setWeight(double weight)
Deprecated.For removal.String
toString()
-
-
-
Constructor Detail
-
BabelSynsetRelation
public BabelSynsetRelation(it.uniroma1.lcl.jlt.util.Language language, BabelPointer pointer, String target)
Builds a synset relation- Parameters:
language
- the relation languagepointer
- the relation typetarget
- the target offset
-
BabelSynsetRelation
@Deprecated public BabelSynsetRelation(it.uniroma1.lcl.jlt.util.Language language, BabelPointer pointer, String target, double weight, double normalizedWeight)
Deprecated.For removal.Builds a synset relation- Parameters:
language
- the relation languagepointer
- the relation typetarget
- the target offsetweight
- the relation weightnormalizedWeight
- the relation normalized weight
-
-
Method Detail
-
getLanguage
public it.uniroma1.lcl.jlt.util.Language getLanguage()
Returns the relation language- Returns:
- the relation language
-
getPointer
public BabelPointer getPointer()
Returns the relation type- Returns:
- the relation type
-
getWeight
@Deprecated public double getWeight()
Deprecated.For removal.Getter for the weight of the relation- Returns:
- the weight of this edge.
-
setWeight
@Deprecated public void setWeight(double weight)
Deprecated.For removal.- Parameters:
weight
- the relation weight
-
getNormalizedWeight
@Deprecated public double getNormalizedWeight()
Deprecated.For removal.Getter for the weight normalized across all relations of the same knowledge source, namely such that \sum_{e \in E_out^{WN/WIKI}} w(e) = 1- Returns:
- the normalized weight of this edge.
-
setNormalizedWeight
@Deprecated public void setNormalizedWeight(double normalizedWeight)
Deprecated.For removal.Sets the relation normalized weight- Parameters:
normalizedWeight
- the normalized weight
-
getTarget
public String getTarget()
Gets the target ID.- Returns:
- String
-
getBabelSynsetIDTarget
public BabelSynsetID getBabelSynsetIDTarget()
Gets the target as aBabelSynsetID
- Returns:
- the target
BabelSynsetID
-
fromString
public static BabelSynsetRelation fromString(String edge)
Creates a new instance ofBabelSynsetRelation
from an input record in the same format as found inBabelNetIndexField.RELATION
- Parameters:
edge
- the String representation of the edge- Returns:
- creates a
BabelSynsetRelation
from a string representation.
-
-