Package it.uniroma1.lcl.babelnet
Interface BabelSynset
-
- All Superinterfaces:
Iterable<BabelSense>
,Synset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>
,Taggable
public interface BabelSynset extends Synset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>
The basic BabelNet synset interface.- Author:
- navigli
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description List<BabelCategory>
getCategories()
Gets the categories (BabelCategory
s) of thisBabelSynset
.List<BabelCategory>
getCategories(it.uniroma1.lcl.jlt.util.Language... languages)
Gets the categories (BabelCategory
s) of thisBabelSynset
in one or more languages.com.google.common.collect.HashMultimap<it.uniroma1.lcl.jlt.util.Language,String>
getCompounds()
Deprecated.No more supportedSet<String>
getCompounds(it.uniroma1.lcl.jlt.util.Language language)
Deprecated.No more supportedList<String>
getDBPediaURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Deprecated.default List<BabelSynsetRelation>
getEdges()
Deprecated.useSynset.getOutgoingEdges()
instead.List<BabelSynsetRelation>
getEdges(BabelPointer... edgeTypes)
Deprecated.useSynset.getOutgoingEdges(SynsetRelationType...)
instead.Optional<FrameID>
getFrameID()
Get the VerbAtlas frame id associated to theBabelSynset
.List<String>
getGeoNamesURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Deprecated.default BabelSynsetID
getId()
Deprecated.UsegetID()
BabelSynsetID
getID()
Gets the id of thisBabelSynset
.List<BabelImage>
getImages()
Gets the images (BabelImage
s) of thisBabelSynset
.default List<BabelLemma>
getLemmas(it.uniroma1.lcl.jlt.util.Language language)
Returns the lemmas in thisBabelSynset
sorted by relevance and typeList<BabelLemma>
getLemmas(it.uniroma1.lcl.jlt.util.Language language, BabelLemmaType... types)
Returns the lemmas in thisBabelSynset
sorted by relevance and typeOptional<BabelImage>
getMainImage()
Gets the best image (BabelImage
) of thisBabelSynset
.default Optional<BabelSense>
getMainSense()
Gets the mainBabelSense
by importance to thisBabelSynset
for any language.Optional<BabelSense>
getMainSense(it.uniroma1.lcl.jlt.util.Language language)
Gets the mainBabelSense
by importance to thisBabelSynset
for a given language.Optional<BabelSense>
getMainSensePreferrablyIn(it.uniroma1.lcl.jlt.util.Language language)
Gets the mainBabelSense
by importance to thisBabelSynset
preferrably for a given language.List<BabelSense>
getMainSenses(it.uniroma1.lcl.jlt.util.Language language)
Collects distinctBabelSense
s sorted by importance to thisBabelSynset
for a given language.com.google.common.collect.LinkedHashMultimap<it.uniroma1.lcl.jlt.util.Language,String>
getOtherForms()
Deprecated.No more supportedSet<String>
getOtherForms(it.uniroma1.lcl.jlt.util.Language language)
Deprecated.No more supportedit.uniroma1.lcl.jlt.util.POS
getPOS()
Gets the part of speech of thisSynset
.List<QcodeID>
getQcodeIDs()
Collects all the Q-codes id associated to theBabelSynset
.List<BabelSenseSource>
getSenseSources()
Set<StringTag>
getStringTags()
Gets theStringTag
s associated to theBabelSynset
.int
getSynsetDegree()
Get the degree of theBabelSynset
.BabelSynsetType
getSynsetType()
Deprecated.UseSynset.getType()
insteadcom.google.common.collect.Multimap<BabelSense,BabelSense>
getTranslations()
Gets all translations between senses found in thisBabelSynset
.Map<WordNetSynsetID,List<WordNetSynsetID>>
getWordNetOffsetMapFrom(it.uniroma1.lcl.jlt.wordnet.WordNetVersion fromVersion)
Obtains a map fromWordNetSynsetID
s of the inputWordNetVersion
to the current version of WordNet (3.0 as of 2016)Map<WordNetSynsetID,List<WordNetSynsetID>>
getWordNetOffsetMapTo(it.uniroma1.lcl.jlt.wordnet.WordNetVersion toVersion)
Obtains a map from the current version of WordNet (3.0 as of 2016) toWordNetSynsetID
s of the inputWordNetVersion
List<WordNetSynsetID>
getWordNetOffsets()
Gets the WordNet offsets (version 3.0) whose corresponding synsets thisBabelSynset
covers, if any.List<String>
getYAGOURIs()
Deprecated.boolean
isKeyConcept()
Determines if the synset is a key conceptString
toString(it.uniroma1.lcl.jlt.util.Language... languages)
Returns the string representation of theBabelSense
s of thisBabelSynset
only for a specific set of languages.-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Methods inherited from interface it.uniroma1.lcl.kb.Synset
addStringTag, getDomains, getExamples, getExamples, getExamples, getExamples, getGlosses, getGlosses, getGlosses, getGlosses, getLanguages, getMainExample, getMainExample, getMainGloss, getMainGloss, getOutgoingEdges, getOutgoingEdges, getSenses, getSenses, getSenses, getSenses, getSenses, getSenses, getType, retainSenses, retainSenses, size, toURIs, toURIs, toURIs
-
Methods inherited from interface it.uniroma1.lcl.babelnet.data.Taggable
getTags, getTags, isTaggedAs, isTaggedAs, isTaggedAs
-
-
-
-
Method Detail
-
getID
BabelSynsetID getID()
Gets the id of thisBabelSynset
.- Specified by:
getID
in interfaceSynset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>
- Returns:
- the id of this
BabelSynset
.
-
getId
@Deprecated default BabelSynsetID getId()
Deprecated.UsegetID()
Gets the id of thisBabelSynset
.- Returns:
- the id of this
BabelSynset
.
-
getPOS
it.uniroma1.lcl.jlt.util.POS getPOS()
Description copied from interface:Synset
Gets the part of speech of thisSynset
.- Specified by:
getPOS
in interfaceSynset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>
- Returns:
- the part of speech of this
Synset
.
-
getSenseSources
List<BabelSenseSource> getSenseSources()
- Specified by:
getSenseSources
in interfaceSynset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>
- Returns:
- a list of
BabelSenseSource
s
-
getCompounds
@Deprecated Set<String> getCompounds(it.uniroma1.lcl.jlt.util.Language language)
Deprecated.No more supportedGet the compounds of thisBabelSynset
for a given language.- Parameters:
language
- the search language- Returns:
- the compounds of this
BabelSynset
in a specific language.
-
getCompounds
@Deprecated com.google.common.collect.HashMultimap<it.uniroma1.lcl.jlt.util.Language,String> getCompounds()
Deprecated.No more supportedGets the compounds of thisBabelSynset
.- Returns:
- the compounds of this
BabelSynset
.
-
getOtherForms
@Deprecated Set<String> getOtherForms(it.uniroma1.lcl.jlt.util.Language language)
Deprecated.No more supportedGet the other forms of thisBabelSynset
for a given language.- Parameters:
language
- the search language- Returns:
- the other forms of this
BabelSynset
in a specific language.
-
getOtherForms
@Deprecated com.google.common.collect.LinkedHashMultimap<it.uniroma1.lcl.jlt.util.Language,String> getOtherForms()
Deprecated.No more supportedGets the other forms of thisBabelSynset
.- Returns:
- the other forms of this
BabelSynset
.
-
getImages
List<BabelImage> getImages()
Gets the images (BabelImage
s) of thisBabelSynset
.- Returns:
- the images (
BabelImage
s) of thisBabelSynset
.
-
getMainImage
Optional<BabelImage> getMainImage()
Gets the best image (BabelImage
) of thisBabelSynset
.- Returns:
- the best image (
BabelImage
) of thisBabelSynset
. (null if doesn't exist)
-
getCategories
List<BabelCategory> getCategories()
Gets the categories (BabelCategory
s) of thisBabelSynset
.- Returns:
- the categories (
BabelCategory
s) of thisBabelSynset
.
-
getCategories
List<BabelCategory> getCategories(it.uniroma1.lcl.jlt.util.Language... languages)
Gets the categories (BabelCategory
s) of thisBabelSynset
in one or more languages.- Parameters:
languages
- the search languages- Returns:
- the categories (
BabelCategory
s) of thisBabelSynset
in the languages specified.
-
getWordNetOffsets
List<WordNetSynsetID> getWordNetOffsets()
Gets the WordNet offsets (version 3.0) whose corresponding synsets thisBabelSynset
covers, if any.- Returns:
- the WordNet offsets corresponding to this
BabelSynset
.
-
getWordNetOffsetMapFrom
Map<WordNetSynsetID,List<WordNetSynsetID>> getWordNetOffsetMapFrom(it.uniroma1.lcl.jlt.wordnet.WordNetVersion fromVersion)
Obtains a map fromWordNetSynsetID
s of the inputWordNetVersion
to the current version of WordNet (3.0 as of 2016)- Parameters:
fromVersion
- the source WordNet version- Returns:
- a map from
WordNetSynsetID
to list ofWordNetSynsetID
-
getWordNetOffsetMapTo
Map<WordNetSynsetID,List<WordNetSynsetID>> getWordNetOffsetMapTo(it.uniroma1.lcl.jlt.wordnet.WordNetVersion toVersion)
Obtains a map from the current version of WordNet (3.0 as of 2016) toWordNetSynsetID
s of the inputWordNetVersion
- Parameters:
toVersion
- the target WordNet version- Returns:
- a map from
WordNetSynsetID
to list ofWordNetSynsetID
-
getLemmas
default List<BabelLemma> getLemmas(it.uniroma1.lcl.jlt.util.Language language)
Returns the lemmas in thisBabelSynset
sorted by relevance and type- Parameters:
language
- the language of interest- Returns:
- the lemmas in the synset sorted by relevance and type
-
getLemmas
List<BabelLemma> getLemmas(it.uniroma1.lcl.jlt.util.Language language, BabelLemmaType... types)
Returns the lemmas in thisBabelSynset
sorted by relevance and type- Parameters:
language
- the language of interesttypes
- the types for the requested synset lemmas- Returns:
- the lemmas in the synset sorted by relevance and type
-
getMainSense
default Optional<BabelSense> getMainSense()
Gets the mainBabelSense
by importance to thisBabelSynset
for any language.- Returns:
- the main sense of this Babel synset.
-
getMainSense
Optional<BabelSense> getMainSense(it.uniroma1.lcl.jlt.util.Language language)
Gets the mainBabelSense
by importance to thisBabelSynset
for a given language.- Parameters:
language
- the language of the main sense- Returns:
- the main sense of this Babel synset in a specific language.
-
getMainSensePreferrablyIn
Optional<BabelSense> getMainSensePreferrablyIn(it.uniroma1.lcl.jlt.util.Language language)
Gets the mainBabelSense
by importance to thisBabelSynset
preferrably for a given language.- Parameters:
language
- the preferred language of the main sense- Returns:
- the senses of this Babel synset in a specific language sorted by importance.
-
getMainSenses
List<BabelSense> getMainSenses(it.uniroma1.lcl.jlt.util.Language language)
Collects distinctBabelSense
s sorted by importance to thisBabelSynset
for a given language.- Parameters:
language
- the search language- Returns:
- the senses of this Babel synset in a specific language sorted by importance.
-
getDBPediaURIs
@Deprecated List<String> getDBPediaURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Deprecated.Get the DBPedia URIs of theBabelSense
s in a specific language found in thisBabelSynset
.- Parameters:
languages
- the search languages- Returns:
- the DBPedia URIs of the
BabelSense
s in this synset. - See Also:
BabelSense.getDBPediaURI()
-
getYAGOURIs
@Deprecated List<String> getYAGOURIs()
Deprecated.Get the YAGO URIs of theBabelSense
s found in thisBabelSynset
.- Returns:
- the YAGO URIs of the
BabelSense
s in this synset. - See Also:
BabelSense.getYAGOURI()
-
getGeoNamesURIs
@Deprecated List<String> getGeoNamesURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Deprecated.Get the GeoNames URIs of theBabelSense
s in a specific language found in thisBabelSynset
.- Parameters:
languages
- the search languages- Returns:
- the GeoNames URIs of the
BabelSense
s in this synset. - See Also:
BabelSense.getGeoNamesURI()
-
toString
String toString(it.uniroma1.lcl.jlt.util.Language... languages)
Returns the string representation of theBabelSense
s of thisBabelSynset
only for a specific set of languages.- Parameters:
languages
- the languages to use for the string representation- Returns:
- a stringified representation of this Babel synset using only the senses in a specific set of languages
-
getEdges
@Deprecated default List<BabelSynsetRelation> getEdges()
Deprecated.useSynset.getOutgoingEdges()
instead.Collects allBabelSynset
edges incident on thisBabelSynset
.- Returns:
- the
BabelSynsetRelation
s incident on thisBabelSynset
-
getEdges
@Deprecated List<BabelSynsetRelation> getEdges(BabelPointer... edgeTypes)
Deprecated.useSynset.getOutgoingEdges(SynsetRelationType...)
instead.- Parameters:
edgeTypes
- the types of the edges connecting this synset to other synsets- Returns:
- only the
BabelSynsetRelation
s tagged with theBabelPointer
s given as input
-
getSynsetType
BabelSynsetType getSynsetType()
Deprecated.UseSynset.getType()
insteadGets the type of thisBabelSynset
, namely whether it's an entity, a concept, etc.- Returns:
- the kind of
BabelSynset
.
-
getTranslations
com.google.common.collect.Multimap<BabelSense,BabelSense> getTranslations()
Gets all translations between senses found in thisBabelSynset
.- Returns:
- the map associating each
BabelSense
in this Babel synset with its translations.
-
isKeyConcept
boolean isKeyConcept()
Determines if the synset is a key concept- Returns:
- true if the synset is a key concept, false otherwise
-
getStringTags
Set<StringTag> getStringTags()
Gets theStringTag
s associated to theBabelSynset
.- Returns:
- the
StringTag
s of thisBabelSynset
-
getFrameID
Optional<FrameID> getFrameID()
Get the VerbAtlas frame id associated to theBabelSynset
.- Returns:
- the VerbAtlas frame id of this
BabelSynset
-
getSynsetDegree
int getSynsetDegree()
Get the degree of theBabelSynset
.- Returns:
- the degree of this
BabelSynset
-
getQcodeIDs
List<QcodeID> getQcodeIDs()
Collects all the Q-codes id associated to theBabelSynset
.- Returns:
- the
QcodeID
s of thisBabelSynset
-
-