Package it.uniroma1.lcl.kb
Class ResourceID
- java.lang.Object
-
- it.uniroma1.lcl.kb.ResourceID
-
- Direct Known Subclasses:
FrameNetID
,GeoNamesID
,MSTermID
,OmegaWikiID
,ResourceWithLemmaID
,SynsetID
,VerbNetID
,WikidataID
,WiktionaryID
public abstract class ResourceID extends Object
A basic resource identifier.- Author:
- navigli, vannella
- See Also:
LKB.getSynset(ResourceID)
,LKB.getSynsets(ResourceID...)
-
-
Field Summary
Fields Modifier and Type Field Description protected String
id
Id of aResourceID
protected it.uniroma1.lcl.jlt.util.Language
language
Language of the resource ID, if availableprotected it.uniroma1.lcl.jlt.util.POS
pos
POS of the resource ID, if availableprotected SenseSource
source
Source of the resource ID
-
Constructor Summary
Constructors Modifier Constructor Description protected
ResourceID(String id, SenseSource source)
Builds the ResourceID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getID()
Returns theResourceID
IDit.uniroma1.lcl.jlt.util.Language
getLanguage()
Gets the language associated with the given ID (default is null)it.uniroma1.lcl.jlt.util.POS
getPOS()
The part of speech tag associated with the given ID (default is null).SenseSource
getSource()
Gets the source associated with the given IDint
hashCode()
String
toString()
List<BabelSynset>
toSynsets()
Converts the ID to a collection ofBabelSynset
sList<BabelSynset>
toSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages)
Converts the ID to a collection ofBabelSynset
s
-
-
-
Field Detail
-
id
protected final String id
Id of aResourceID
-
pos
protected it.uniroma1.lcl.jlt.util.POS pos
POS of the resource ID, if available
-
source
protected SenseSource source
Source of the resource ID
-
language
protected it.uniroma1.lcl.jlt.util.Language language
Language of the resource ID, if available
-
-
Constructor Detail
-
ResourceID
protected ResourceID(String id, SenseSource source)
Builds the ResourceID- Parameters:
id
- id of the resourcesource
- source of the resource
-
-
Method Detail
-
getID
public String getID()
Returns theResourceID
ID- Returns:
- the
ResourceID
ID
-
getPOS
public it.uniroma1.lcl.jlt.util.POS getPOS()
The part of speech tag associated with the given ID (default is null).- Returns:
- the POS tag of the resource
-
getSource
public SenseSource getSource()
Gets the source associated with the given ID- Returns:
- the associated source
-
getLanguage
public it.uniroma1.lcl.jlt.util.Language getLanguage()
Gets the language associated with the given ID (default is null)- Returns:
- the associated language
-
toSynsets
public List<BabelSynset> toSynsets()
Converts the ID to a collection ofBabelSynset
s- Returns:
- the corresponding synsets (in most cases, it will be just a single synset)
-
toSynsets
public List<BabelSynset> toSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages)
Converts the ID to a collection ofBabelSynset
s- Parameters:
targetLanguages
- the languages to populate the synsets with- Returns:
- the corresponding synsets (in most cases, it will be just a single synset)
-
-