Package it.uniroma1.lcl.babelnet
Class BabelSynsetID
- java.lang.Object
-
- it.uniroma1.lcl.kb.ResourceID
-
- it.uniroma1.lcl.kb.SynsetID
-
- it.uniroma1.lcl.babelnet.BabelSynsetID
-
public class BabelSynsetID extends SynsetID
Constructs a resource identifier with the specifiedBabelSynsetID. To obtain the corresponding synset, calltoSynset().Usage example:
ResourceID rID = new BabelSynsetID("bn:03083790n");- Author:
- navigli
-
-
Field Summary
Fields Modifier and Type Field Description static intBABELNET_ID_LENGTHThe BabelNet ID lengthstatic StringBABELNET_ID_PREFIXThe BabelNet ID prefixstatic intWORDATLAS_ID_LENGTHThe WordAtlas ID length "wa:tqlms5n"static StringWORDATLAS_ID_PREFIXThe WordAtlas ID prefix-
Fields inherited from class it.uniroma1.lcl.kb.ResourceID
id, language, pos, source
-
-
Constructor Summary
Constructors Constructor Description BabelSynsetID(String id)Constructs the object with a given ID
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<BabelSynsetRelation>getOutgoingEdges()Returns the edges which connect the current synsetList<BabelSynsetRelation>getOutgoingEdges(BabelPointer... relationTypes)List<BabelSynsetRelation>getOutgoingEdges(Collection<it.uniroma1.lcl.jlt.util.Language> searchLanguages)Deprecated.List<BabelSynsetRelation>getRelatedIDs()Deprecated.UsegetOutgoingEdges()insteadList<BabelSynsetRelation>getRelatedIDs(Collection<it.uniroma1.lcl.jlt.util.Language> searchLanguages)Deprecated.UsegetOutgoingEdges(Collection)insteadprotected booleanisValid()Returns true if the synset ID is validBabelSynsettoBabelSynset()Deprecated.UsetoSynset()insteadBabelSynsettoBabelSynset(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages)Deprecated.UseResourceID.toSynsets(Collection)insteadBabelSynsettoSynset()From a lightweight BabelSynsetID, creates the correspondingBabelSynset-
Methods inherited from class it.uniroma1.lcl.kb.SynsetID
getSimpleOffset
-
Methods inherited from class it.uniroma1.lcl.kb.ResourceID
equals, getID, getLanguage, getPOS, getSource, hashCode, toString, toSynsets, toSynsets
-
-
-
-
Field Detail
-
BABELNET_ID_PREFIX
public static final String BABELNET_ID_PREFIX
The BabelNet ID prefix- See Also:
- Constant Field Values
-
WORDATLAS_ID_PREFIX
public static final String WORDATLAS_ID_PREFIX
The WordAtlas ID prefix- See Also:
- Constant Field Values
-
BABELNET_ID_LENGTH
public static final int BABELNET_ID_LENGTH
The BabelNet ID length- See Also:
- Constant Field Values
-
WORDATLAS_ID_LENGTH
public static final int WORDATLAS_ID_LENGTH
The WordAtlas ID length "wa:tqlms5n"- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BabelSynsetID
public BabelSynsetID(String id) throws InvalidSynsetIDException
Constructs the object with a given ID- Parameters:
id- the ID of theBabelSynset- Throws:
InvalidSynsetIDException- thrown if the ID is invalid
-
-
Method Detail
-
isValid
protected boolean isValid()
Description copied from class:SynsetIDReturns true if the synset ID is valid
-
toSynset
public BabelSynset toSynset()
From a lightweight BabelSynsetID, creates the correspondingBabelSynset- Returns:
- the
BabelSynsetcorresponding to this ID
-
toBabelSynset
@Deprecated public BabelSynset 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 public List<BabelSynsetRelation> 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
public List<BabelSynsetRelation> 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
public List<BabelSynsetRelation> getOutgoingEdges(BabelPointer... relationTypes)
- Parameters:
relationTypes- the types of the relation connecting this synset to other synsets- Returns:
- only the
SynsetRelations tagged with theSynsetRelationTypes given as input
-
-