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 (BabelCategorys) of thisBabelSynset.List<BabelCategory>getCategories(it.uniroma1.lcl.jlt.util.Language... languages)Gets the categories (BabelCategorys) of thisBabelSynsetin 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 BabelSynsetIDgetId()Deprecated.UsegetID()BabelSynsetIDgetID()Gets the id of thisBabelSynset.List<BabelImage>getImages()Gets the images (BabelImages) of thisBabelSynset.default List<BabelLemma>getLemmas(it.uniroma1.lcl.jlt.util.Language language)Returns the lemmas in thisBabelSynsetsorted by relevance and typeList<BabelLemma>getLemmas(it.uniroma1.lcl.jlt.util.Language language, BabelLemmaType... types)Returns the lemmas in thisBabelSynsetsorted by relevance and typeOptional<BabelImage>getMainImage()Gets the best image (BabelImage) of thisBabelSynset.default Optional<BabelSense>getMainSense()Gets the mainBabelSenseby importance to thisBabelSynsetfor any language.Optional<BabelSense>getMainSense(it.uniroma1.lcl.jlt.util.Language language)Gets the mainBabelSenseby importance to thisBabelSynsetfor a given language.Optional<BabelSense>getMainSensePreferrablyIn(it.uniroma1.lcl.jlt.util.Language language)Gets the mainBabelSenseby importance to thisBabelSynsetpreferrably for a given language.List<BabelSense>getMainSenses(it.uniroma1.lcl.jlt.util.Language language)Collects distinctBabelSenses sorted by importance to thisBabelSynsetfor 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.POSgetPOS()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 theStringTags associated to theBabelSynset.intgetSynsetDegree()Get the degree of theBabelSynset.BabelSynsetTypegetSynsetType()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 fromWordNetSynsetIDs of the inputWordNetVersionto 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) toWordNetSynsetIDs of the inputWordNetVersionList<WordNetSynsetID>getWordNetOffsets()Gets the WordNet offsets (version 3.0) whose corresponding synsets thisBabelSynsetcovers, if any.List<String>getYAGOURIs()Deprecated.booleanisKeyConcept()Determines if the synset is a key conceptStringtoString(it.uniroma1.lcl.jlt.util.Language... languages)Returns the string representation of theBabelSenses of thisBabelSynsetonly 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:
getIDin 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:SynsetGets the part of speech of thisSynset.- Specified by:
getPOSin interfaceSynset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>- Returns:
- the part of speech of this
Synset.
-
getSenseSources
List<BabelSenseSource> getSenseSources()
- Specified by:
getSenseSourcesin interfaceSynset<BabelSense,BabelSynsetRelation,BabelPointer,BabelGloss,BabelExample>- Returns:
- a list of
BabelSenseSources
-
getCompounds
@Deprecated Set<String> getCompounds(it.uniroma1.lcl.jlt.util.Language language)
Deprecated.No more supportedGet the compounds of thisBabelSynsetfor a given language.- Parameters:
language- the search language- Returns:
- the compounds of this
BabelSynsetin 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 thisBabelSynsetfor a given language.- Parameters:
language- the search language- Returns:
- the other forms of this
BabelSynsetin 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 (BabelImages) of thisBabelSynset.- Returns:
- the images (
BabelImages) 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 (BabelCategorys) of thisBabelSynset.- Returns:
- the categories (
BabelCategorys) of thisBabelSynset.
-
getCategories
List<BabelCategory> getCategories(it.uniroma1.lcl.jlt.util.Language... languages)
Gets the categories (BabelCategorys) of thisBabelSynsetin one or more languages.- Parameters:
languages- the search languages- Returns:
- the categories (
BabelCategorys) of thisBabelSynsetin the languages specified.
-
getWordNetOffsets
List<WordNetSynsetID> getWordNetOffsets()
Gets the WordNet offsets (version 3.0) whose corresponding synsets thisBabelSynsetcovers, 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 fromWordNetSynsetIDs of the inputWordNetVersionto the current version of WordNet (3.0 as of 2016)- Parameters:
fromVersion- the source WordNet version- Returns:
- a map from
WordNetSynsetIDto 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) toWordNetSynsetIDs of the inputWordNetVersion- Parameters:
toVersion- the target WordNet version- Returns:
- a map from
WordNetSynsetIDto list ofWordNetSynsetID
-
getLemmas
default List<BabelLemma> getLemmas(it.uniroma1.lcl.jlt.util.Language language)
Returns the lemmas in thisBabelSynsetsorted 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 thisBabelSynsetsorted 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 mainBabelSenseby importance to thisBabelSynsetfor any language.- Returns:
- the main sense of this Babel synset.
-
getMainSense
Optional<BabelSense> getMainSense(it.uniroma1.lcl.jlt.util.Language language)
Gets the mainBabelSenseby importance to thisBabelSynsetfor 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 mainBabelSenseby importance to thisBabelSynsetpreferrably 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 distinctBabelSenses sorted by importance to thisBabelSynsetfor 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 theBabelSenses in a specific language found in thisBabelSynset.- Parameters:
languages- the search languages- Returns:
- the DBPedia URIs of the
BabelSenses in this synset. - See Also:
BabelSense.getDBPediaURI()
-
getYAGOURIs
@Deprecated List<String> getYAGOURIs()
Deprecated.Get the YAGO URIs of theBabelSenses found in thisBabelSynset.- Returns:
- the YAGO URIs of the
BabelSenses 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 theBabelSenses in a specific language found in thisBabelSynset.- Parameters:
languages- the search languages- Returns:
- the GeoNames URIs of the
BabelSenses in this synset. - See Also:
BabelSense.getGeoNamesURI()
-
toString
String toString(it.uniroma1.lcl.jlt.util.Language... languages)
Returns the string representation of theBabelSenses of thisBabelSynsetonly 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 allBabelSynsetedges incident on thisBabelSynset.- Returns:
- the
BabelSynsetRelations 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
BabelSynsetRelations tagged with theBabelPointers 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
BabelSensein 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 theStringTags associated to theBabelSynset.- Returns:
- the
StringTags 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
QcodeIDs of thisBabelSynset
-
-