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 booleanequals(Object obj)static BabelSynsetRelationfromString(String edge)Creates a new instance ofBabelSynsetRelationfrom an input record in the same format as found inBabelNetIndexField.RELATIONBabelSynsetIDgetBabelSynsetIDTarget()Gets the target as aBabelSynsetIDit.uniroma1.lcl.jlt.util.LanguagegetLanguage()Returns the relation languagedoublegetNormalizedWeight()Deprecated.For removal.BabelPointergetPointer()Returns the relation typeStringgetTarget()Gets the target ID.doublegetWeight()Deprecated.For removal.inthashCode()voidsetNormalizedWeight(double normalizedWeight)Deprecated.For removal.voidsetWeight(double weight)Deprecated.For removal.StringtoString()
-
-
-
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 ofBabelSynsetRelationfrom an input record in the same format as found inBabelNetIndexField.RELATION- Parameters:
edge- the String representation of the edge- Returns:
- creates a
BabelSynsetRelationfrom a string representation.
-
-