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 StringidId of aResourceIDprotected it.uniroma1.lcl.jlt.util.LanguagelanguageLanguage of the resource ID, if availableprotected it.uniroma1.lcl.jlt.util.POSposPOS of the resource ID, if availableprotected SenseSourcesourceSource of the resource ID
-
Constructor Summary
Constructors Modifier Constructor Description protectedResourceID(String id, SenseSource source)Builds the ResourceID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetID()Returns theResourceIDIDit.uniroma1.lcl.jlt.util.LanguagegetLanguage()Gets the language associated with the given ID (default is null)it.uniroma1.lcl.jlt.util.POSgetPOS()The part of speech tag associated with the given ID (default is null).SenseSourcegetSource()Gets the source associated with the given IDinthashCode()StringtoString()List<BabelSynset>toSynsets()Converts the ID to a collection ofBabelSynsetsList<BabelSynset>toSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages)Converts the ID to a collection ofBabelSynsets
-
-
-
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 theResourceIDID- Returns:
- the
ResourceIDID
-
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 ofBabelSynsets- 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 ofBabelSynsets- Parameters:
targetLanguages- the languages to populate the synsets with- Returns:
- the corresponding synsets (in most cases, it will be just a single synset)
-
-