Class BabelSynsetRelation
java.lang.Object
it.uniroma1.lcl.babelnet.BabelSynsetRelation
- All Implemented Interfaces:
SynsetRelation
- Direct Known Subclasses:
BabelSynsetIDRelation
Class that models a relation to a synset ID in the BabelNet network.
- Author:
- navigli, vannella
-
Constructor Summary
ConstructorsConstructorDescriptionBabelSynsetRelation(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
Modifier and TypeMethodDescriptionbooleanstatic BabelSynsetRelationfromString(String edge) Creates a new instance ofBabelSynsetRelationfrom an input record in the same format as found inBabelNetIndexField.RELATIONGets the target as aBabelSynsetIDit.uniroma1.lcl.jlt.util.LanguageReturns the relation languagedoubleDeprecated.For removal.Returns the relation typeGets the target ID.doubleDeprecated.For removal.inthashCode()voidsetNormalizedWeight(double normalizedWeight) Deprecated.For removal.voidsetWeight(double weight) Deprecated.For removal.toString()
-
Constructor Details
-
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 Details
-
getLanguage
public it.uniroma1.lcl.jlt.util.Language getLanguage()Returns the relation language- Returns:
- the relation language
-
getPointer
-
getWeight
Deprecated.For removal.Getter for the weight of the relation- Returns:
- the weight of this edge.
-
setWeight
Deprecated.For removal.- Parameters:
weight- the relation weight
-
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.For removal.Sets the relation normalized weight- Parameters:
normalizedWeight- the normalized weight
-
getTarget
-
getBabelSynsetIDTarget
Gets the target as aBabelSynsetID- Returns:
- the target
BabelSynsetID
-
fromString
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.
-
toString
-
hashCode
-
equals
-