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 specifiedBabelSynset
ID. 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 int
BABELNET_ID_LENGTH
The BabelNet ID lengthstatic String
BABELNET_ID_PREFIX
The BabelNet ID prefixstatic int
WORDATLAS_ID_LENGTH
The WordAtlas ID length "wa:tqlms5n"static String
WORDATLAS_ID_PREFIX
The 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 boolean
isValid()
Returns true if the synset ID is validBabelSynset
toBabelSynset()
Deprecated.UsetoSynset()
insteadBabelSynset
toBabelSynset(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages)
Deprecated.UseResourceID.toSynsets(Collection)
insteadBabelSynset
toSynset()
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:SynsetID
Returns true if the synset ID is valid
-
toSynset
public BabelSynset toSynset()
From a lightweight BabelSynsetID, creates the correspondingBabelSynset
- Returns:
- the
BabelSynset
corresponding to this ID
-
toBabelSynset
@Deprecated public BabelSynset toBabelSynset()
Deprecated.UsetoSynset()
insteadFrom a lightweight BabelSynsetID, creates the corresponding Babel synset- Returns:
- the
BabelSynset
corresponding 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
BabelSynset
corresponding to this ID
-
getRelatedIDs
@Deprecated public List<BabelSynsetRelation> getRelatedIDs()
Deprecated.UsegetOutgoingEdges()
insteadReturns the edges which connect the currentBabelSynset
- Returns:
- the
BabelSynsetRelation
s 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
BabelSynsetRelation
s outgoing from this synset
-
getOutgoingEdges
public List<BabelSynsetRelation> getOutgoingEdges()
Returns the edges which connect the current synset- Returns:
- the
BabelSynsetRelation
s 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
BabelSynsetRelation
s 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
SynsetRelation
s tagged with theSynsetRelationType
s given as input
-
-