Class BabelSynsetID
java.lang.Object
it.uniroma1.lcl.kb.ResourceID
it.uniroma1.lcl.kb.SynsetID
it.uniroma1.lcl.babelnet.BabelSynsetID
Constructs a resource identifier with the specified
BabelSynset ID.
To obtain the corresponding synset, call toSynset().
Usage example:
ResourceID rID = new BabelSynsetID("bn:03083790n");- Author:
- navigli
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe BabelNet ID lengthstatic final StringThe BabelNet ID prefixstatic final intThe WordAtlas ID length "wa:tqlms5n"static final StringThe WordAtlas ID prefixFields inherited from class ResourceID
id, language, pos, source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the edges which connect the current synsetgetOutgoingEdges(BabelPointer... relationTypes) getOutgoingEdges(Collection<it.uniroma1.lcl.jlt.util.Language> searchLanguages) Deprecated.Deprecated.UsegetOutgoingEdges()insteadgetRelatedIDs(Collection<it.uniroma1.lcl.jlt.util.Language> searchLanguages) Deprecated.UsegetOutgoingEdges(Collection)insteadprotected booleanisValid()Returns true if the synset ID is validDeprecated.UsetoSynset()insteadtoBabelSynset(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages) Deprecated.UseResourceID.toSynsets(Collection)insteadtoSynset()From a lightweight BabelSynsetID, creates the correspondingBabelSynsetMethods inherited from class SynsetID
getSimpleOffsetMethods inherited from class ResourceID
equals, getID, getLanguage, getPOS, getSource, hashCode, toString, toSynsets, toSynsets
-
Field Details
-
BABELNET_ID_PREFIX
-
WORDATLAS_ID_PREFIX
-
BABELNET_ID_LENGTH
public static final int BABELNET_ID_LENGTHThe BabelNet ID length- See Also:
-
WORDATLAS_ID_LENGTH
public static final int WORDATLAS_ID_LENGTHThe WordAtlas ID length "wa:tqlms5n"- See Also:
-
-
Constructor Details
-
BabelSynsetID
Constructs the object with a given ID- Parameters:
id- the ID of theBabelSynset- Throws:
InvalidSynsetIDException- thrown if the ID is invalid
-
-
Method Details
-
isValid
-
toSynset
From a lightweight BabelSynsetID, creates the correspondingBabelSynset- Returns:
- the
BabelSynsetcorresponding to this ID
-
toBabelSynset
Deprecated.UsetoSynset()insteadFrom a lightweight BabelSynsetID, creates the corresponding Babel synset- Returns:
- the
BabelSynsetcorresponding to this ID
-
toBabelSynset
@Deprecated public BabelSynset toBabelSynset(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages) Deprecated.UseResourceID.toSynsets(Collection)insteadFrom a lightweight BabelSynsetID, creates the correspondingBabelSynset- Parameters:
targetLanguages- the languages in which the data are to be retrieved.- Returns:
- the
BabelSynsetcorresponding to this ID
-
getRelatedIDs
Deprecated.UsegetOutgoingEdges()insteadReturns the edges which connect the currentBabelSynset- Returns:
- the
BabelSynsetRelations outgoing from this synset
-
getRelatedIDs
@Deprecated public List<BabelSynsetRelation> getRelatedIDs(Collection<it.uniroma1.lcl.jlt.util.Language> searchLanguages) Deprecated.UsegetOutgoingEdges(Collection)insteadReturns the edges (in the search language) which connect the current synset- Parameters:
searchLanguages- the languages in which the relations are to be retrieved.- Returns:
- the
BabelSynsetRelations outgoing from this synset
-
getOutgoingEdges
Returns the edges which connect the current synset- Returns:
- the
BabelSynsetRelations outgoing from this synset
-
getOutgoingEdges
@Deprecated public List<BabelSynsetRelation> getOutgoingEdges(Collection<it.uniroma1.lcl.jlt.util.Language> searchLanguages) Deprecated.Returns the edges (in the search language) which connect the current synset- Parameters:
searchLanguages- the languages in which the relations are to be retrieved.- Returns:
- the
BabelSynsetRelations outgoing from this synset
-
getOutgoingEdges
- Parameters:
relationTypes- the types of the relation connecting this synset to other synsets- Returns:
- only the
SynsetRelations tagged with theSynsetRelationTypes given as input
-
getOutgoingEdges(Collection)