public abstract class BabelSynset extends Object implements Iterable<BabelSense>
Modifier and Type | Field and Description |
---|---|
protected boolean |
bKeyConcept
True if the synset is a key concept
|
protected boolean |
bLoaded
True if the synset has been fully loaded, false otherwise
|
protected List<BabelSenseSource> |
containedSenseSources
List of contained sense sources
|
Constructor and Description |
---|
BabelSynset(BabelSynsetID id)
Minimal BabelSynset built with just its ID
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
abstract List<BabelCategory> |
getCategories()
Gets the categories (
BabelCategory s) of this
BabelSynset . |
abstract List<BabelCategory> |
getCategories(it.uniroma1.lcl.jlt.util.Language... languages)
Gets the categories (
BabelCategory s) of this
BabelSynset in a specific language. |
abstract com.google.common.collect.HashMultimap<it.uniroma1.lcl.jlt.util.Language,String> |
getCompounds()
Gets the compounds of this
BabelSynset . |
abstract Set<String> |
getCompounds(it.uniroma1.lcl.jlt.util.Language ln)
Get the compounds of this
BabelSynset for a give language. |
abstract List<String> |
getDBPediaURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Get the DBPedia URIs of the
BabelSense s in a specific language
found in this BabelSynset . |
abstract HashMap<BabelDomain,Double> |
getDomains()
Gets the
BabelDomain s of this BabelSynset . |
abstract List<BabelSynsetIDRelation> |
getEdges()
Collects all
BabelSynset edges to this
BabelSynset . |
abstract List<BabelSynsetIDRelation> |
getEdges(BabelPointer... typesOfRelation)
|
abstract List<BabelExample> |
getExamples()
Collects all
BabelExample s for this
BabelSynset . |
abstract List<BabelExample> |
getExamples(it.uniroma1.lcl.jlt.util.Language lang)
Collects all
BabelExample s in the given languages
for this BabelSynset . |
abstract List<BabelExample> |
getExamples(it.uniroma1.lcl.jlt.util.Language lang,
BabelSenseSource source)
Collects all
BabelExample s in the given language and source
for this BabelSynset . |
abstract List<String> |
getFreebaseURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Deprecated.
Freebase will be shut-down soon.
|
abstract List<String> |
getGeoNamesURIs(it.uniroma1.lcl.jlt.util.Language... languages)
Get the GeoNames URIs of the
BabelSense s in a specific language
found in this BabelSynset . |
abstract List<BabelGloss> |
getGlosses()
Collects all
BabelGloss es for this
BabelSynset . |
abstract List<BabelGloss> |
getGlosses(BabelSenseSource source)
Collects all
BabelGloss es in the given source
for this BabelSynset . |
abstract List<BabelGloss> |
getGlosses(it.uniroma1.lcl.jlt.util.Language lang)
Collects all
BabelGloss es in the given languages
for this BabelSynset . |
BabelSynsetID |
getId()
Gets the id of this
BabelSynset . |
abstract BabelImage |
getImage()
Gets the best image (
BabelImage ) of this BabelSynset . |
abstract List<BabelImage> |
getImages()
Gets the images (
BabelImage s) of this BabelSynset . |
abstract BabelGloss |
getMainGloss(it.uniroma1.lcl.jlt.util.Language lang)
Get the main
BabelGloss in the given languages
for this BabelSynset . |
abstract BabelSense |
getMainSense(it.uniroma1.lcl.jlt.util.Language ln)
BabelSense order by importance to this BabelSynset for a give language. |
abstract List<BabelSense> |
getMainSenses(it.uniroma1.lcl.jlt.util.Language ln)
Collects distinct
BabelSense s order by importance to this
BabelSynset for a give language. |
abstract com.google.common.collect.LinkedHashMultimap<it.uniroma1.lcl.jlt.util.Language,String> |
getOtherForms()
Gets the other forms of this
BabelSynset . |
abstract Set<String> |
getOtherForms(it.uniroma1.lcl.jlt.util.Language ln)
Get the other forms of this
BabelSynset for a give language. |
BabelPOS |
getPOS()
Gets the part-of-speech of this
BabelSynset . |
abstract List<BabelSense> |
getSenses()
Get the senses contained in this
BabelSynset |
abstract List<BabelSense> |
getSenses(BabelSenseSource source)
Get the senses contained in this
BabelSynset for an
input sense source |
abstract List<BabelSense> |
getSenses(it.uniroma1.lcl.jlt.util.Language language)
Get the senses contained in this
BabelSynset for an
input language |
abstract List<BabelSense> |
getSenses(it.uniroma1.lcl.jlt.util.Language language,
BabelSenseSource source)
Get the senses contained in this
BabelSynset for an
input language and sense source |
List<BabelSense> |
getSenses(it.uniroma1.lcl.jlt.util.Language language,
String lemma,
BabelSenseSource... sources)
Deprecated.
use
getSenses(String, Language, BabelSenseSource...) instead. |
List<BabelSense> |
getSenses(String lemma,
it.uniroma1.lcl.jlt.util.Language language,
BabelSenseSource... sources)
Gets the
BabelSense for the input word in the given language |
abstract List<BabelSense> |
getSenses(String lemma,
it.uniroma1.lcl.jlt.util.Language language,
boolean normalized,
BabelSenseSource... sources)
Gets the
BabelSense for the input word in the given language |
abstract List<BabelSenseSource> |
getSenseSources()
Collects all
BabelSenseSource s contained
for this BabelSynset . |
abstract BabelSynsetSource |
getSynsetSource()
Gets the
BabelSynsetSource of this BabelSynset . |
abstract BabelSynsetType |
getSynsetType()
Gets the type of this
OperativeBabelSynset , namely whether it's
an entity, a concept, etc. |
abstract com.google.common.collect.Multimap<BabelSense,BabelSense> |
getTranslations()
Gets all translations between senses found in this
BabelSynset . |
abstract com.google.common.collect.Multimap<BabelSense,BabelSense> |
getTranslations(int minSupport,
double minConfidence)
Gets all translations between senses found in this
BabelSynset . |
abstract Map<WordNetSynsetID,List<WordNetSynsetID>> |
getWordNetOffsetMapFrom(it.uniroma1.lcl.jlt.wordnet.WordNetVersion fromVersion)
Obtain a map from
WordNetSynsetID s of the input WordNetVersion to the current version of WordNet (3.0 as of 2016) |
abstract Map<WordNetSynsetID,List<WordNetSynsetID>> |
getWordNetOffsetMapTo(it.uniroma1.lcl.jlt.wordnet.WordNetVersion toVersion)
Obtain a map from current version of WordNet (3.0 as of 2016) to
WordNetSynsetID s of the input WordNetVersion |
abstract List<WordNetSynsetID> |
getWordNetOffsets()
Gets the WordNet offsets (Version 3.0) whose corresponding synsets this
BabelSynset covers, if any. |
abstract List<String> |
getYAGOURIs()
Get the YAGO URIs of the
BabelSense s
found in this BabelSynset . |
int |
hashCode() |
boolean |
isKeyConcept() |
protected boolean |
isLoaded()
Checks whether the missing data have been loaded
|
abstract Iterator<BabelSense> |
iterator()
Iterator of BabelSenses
|
protected abstract void |
load()
Loads the missing data into the synset
|
abstract String |
toString() |
abstract String |
toString(it.uniroma1.lcl.jlt.util.Language... languages)
Prints the
BabelSense s of this BabelSynset only
for a specific set of languages. |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected boolean bKeyConcept
protected boolean bLoaded
protected List<BabelSenseSource> containedSenseSources
public BabelSynset(BabelSynsetID id)
id
- the BabelSynset IDpublic BabelSynsetID getId()
BabelSynset
.BabelSynset
.public BabelPOS getPOS()
BabelSynset
.BabelSynset
.public abstract BabelSynsetSource getSynsetSource()
BabelSynsetSource
of this BabelSynset
.BabelSynsetSource
of this BabelSynset
.public abstract HashMap<BabelDomain,Double> getDomains()
BabelDomain
s of this BabelSynset
.BabelDomain
of this BabelSynset
.public abstract Set<String> getCompounds(it.uniroma1.lcl.jlt.util.Language ln)
BabelSynset
for a give language.BabelSynset
in a specific language.public abstract com.google.common.collect.HashMultimap<it.uniroma1.lcl.jlt.util.Language,String> getCompounds()
BabelSynset
.BabelSynset
.public abstract Set<String> getOtherForms(it.uniroma1.lcl.jlt.util.Language ln)
BabelSynset
for a give language.BabelSynset
in a specific language.public abstract com.google.common.collect.LinkedHashMultimap<it.uniroma1.lcl.jlt.util.Language,String> getOtherForms()
BabelSynset
.BabelSynset
.public abstract List<BabelImage> getImages()
BabelImage
s) of this BabelSynset
.BabelImage
s) of this
BabelSynset
.public abstract BabelImage getImage()
BabelImage
) of this BabelSynset
.BabelImage
) of this
BabelSynset
. (null if doesn't exist)public abstract List<BabelCategory> getCategories()
BabelCategory
s) of this
BabelSynset
.BabelCategory
s) of this
BabelSynset
.public abstract List<BabelCategory> getCategories(it.uniroma1.lcl.jlt.util.Language... languages)
BabelCategory
s) of this
BabelSynset
in a specific language.BabelCategory
s) of this
BabelSynset
in a certain language.public abstract List<WordNetSynsetID> getWordNetOffsets()
BabelSynset
covers, if any.BabelSynset
.public abstract Map<WordNetSynsetID,List<WordNetSynsetID>> getWordNetOffsetMapFrom(it.uniroma1.lcl.jlt.wordnet.WordNetVersion fromVersion)
WordNetSynsetID
s of the input WordNetVersion
to the current version of WordNet (3.0 as of 2016)WordNetSynsetID
to list of WordNetSynsetID
public abstract Map<WordNetSynsetID,List<WordNetSynsetID>> getWordNetOffsetMapTo(it.uniroma1.lcl.jlt.wordnet.WordNetVersion toVersion)
WordNetSynsetID
s of the input WordNetVersion
WordNetSynsetID
to list of WordNetSynsetID
public abstract BabelSense getMainSense(it.uniroma1.lcl.jlt.util.Language ln)
BabelSense
order by importance to this BabelSynset
for a give language.public abstract List<BabelSense> getMainSenses(it.uniroma1.lcl.jlt.util.Language ln)
BabelSense
s order by importance to this
BabelSynset
for a give language.public abstract List<BabelSense> getSenses()
BabelSynset
public abstract List<BabelSense> getSenses(it.uniroma1.lcl.jlt.util.Language language)
BabelSynset
for an
input languagepublic abstract List<BabelSense> getSenses(BabelSenseSource source)
BabelSynset
for an
input sense sourcepublic abstract List<BabelSense> getSenses(it.uniroma1.lcl.jlt.util.Language language, BabelSenseSource source)
BabelSynset
for an
input language and sense source@Deprecated public List<BabelSense> getSenses(it.uniroma1.lcl.jlt.util.Language language, String lemma, BabelSenseSource... sources)
getSenses(String, Language, BabelSenseSource...)
instead.BabelSense
for the input word in the given languagelanguage
- language of the senselemma
- lemma of the sensesources
- possible sources for the senseBabelSense
for the input word in the given languagepublic List<BabelSense> getSenses(String lemma, it.uniroma1.lcl.jlt.util.Language language, BabelSenseSource... sources)
BabelSense
for the input word in the given languagelemma
- lemma of the senselanguage
- language of the sensesources
- possible sources for the senseBabelSense
for the input word in the given languagepublic abstract List<BabelSense> getSenses(String lemma, it.uniroma1.lcl.jlt.util.Language language, boolean normalized, BabelSenseSource... sources)
BabelSense
for the input word in the given languagelemma
- lemma of the senselanguage
- language of the sensesources
- possible sources for the senseBabelSense
for the input word in the given languagepublic abstract List<String> getDBPediaURIs(it.uniroma1.lcl.jlt.util.Language... languages)
BabelSense
s in a specific language
found in this BabelSynset
.languages
- BabelSense
s in this synset.BabelSense.getDBPediaURI()
public abstract List<String> getYAGOURIs()
BabelSense
s
found in this BabelSynset
.BabelSense
s in this synset.BabelSense.getYAGOURI()
public abstract List<String> getFreebaseURIs(it.uniroma1.lcl.jlt.util.Language... languages)
BabelSense
s in a specific language
found in this BabelSynset
.languages
- BabelSense
s in this synset.BabelSense.getFreebaseURI()
public abstract List<String> getGeoNamesURIs(it.uniroma1.lcl.jlt.util.Language... languages)
BabelSense
s in a specific language
found in this BabelSynset
.languages
- BabelSense
s in this synset.BabelSense.getGeoNamesURI()
public abstract String toString(it.uniroma1.lcl.jlt.util.Language... languages)
BabelSense
s of this BabelSynset
only
for a specific set of languages.languages
- public abstract BabelGloss getMainGloss(it.uniroma1.lcl.jlt.util.Language lang) throws IOException
BabelGloss
in the given languages
for this BabelSynset
.lang
- the gloss languageBabelGloss
for the input languageIOException
public abstract List<BabelGloss> getGlosses(BabelSenseSource source) throws IOException
BabelGloss
es in the given source
for this BabelSynset
.source
- the gloss sourceBabelSynset
for the input sourceIOException
public abstract List<BabelGloss> getGlosses(it.uniroma1.lcl.jlt.util.Language lang) throws IOException
BabelGloss
es in the given languages
for this BabelSynset
.lang
- the gloss languageBabelSynset
for the input languageIOException
public abstract List<BabelExample> getExamples(it.uniroma1.lcl.jlt.util.Language lang) throws IOException
BabelExample
s in the given languages
for this BabelSynset
.lang
- the example languageBabelSynset
for the input languageIOException
public abstract List<BabelExample> getExamples(it.uniroma1.lcl.jlt.util.Language lang, BabelSenseSource source) throws IOException
BabelExample
s in the given language and source
for this BabelSynset
.lang
- the example languagesource
- the example sourceBabelSynset
for the input language and sourceIOException
public abstract List<BabelSenseSource> getSenseSources()
BabelSenseSource
s contained
for this BabelSynset
.BabelSenseSource
sIOException
public abstract List<BabelExample> getExamples() throws IOException
BabelExample
s for this
BabelSynset
.BabelSynset
IOException
public abstract List<BabelGloss> getGlosses() throws IOException
BabelGloss
es for this
BabelSynset
.BabelSynset
IOException
public abstract List<BabelSynsetIDRelation> getEdges()
BabelSynset
edges to this
BabelSynset
.BabelSynsetIDRelation
s related to this
BabelSynset
IOException
public abstract List<BabelSynsetIDRelation> getEdges(BabelPointer... typesOfRelation)
BabelSynsetIDRelation
s related with the BabelPointer
s
specified in input to this BabelSynset
IOException
public abstract BabelSynsetType getSynsetType()
OperativeBabelSynset
, namely whether it's
an entity, a concept, etc.OperativeBabelSynset
.public abstract Iterator<BabelSense> iterator()
iterator
in interface Iterable<BabelSense>
public abstract com.google.common.collect.Multimap<BabelSense,BabelSense> getTranslations()
BabelSynset
.BabelSense
in this Babel
synset with its translations.public abstract com.google.common.collect.Multimap<BabelSense,BabelSense> getTranslations(int minSupport, double minConfidence)
BabelSynset
.minSupport
- the minimum number of sense-annotated examples needed for a
translation to be returnedminConfidence
- the minimum confidence score needed for a translation to be
returnedBabelSense
in this Babel
synset with its translations.public boolean isKeyConcept()
protected abstract void load()
protected boolean isLoaded()
Copyright © 2016. All rights reserved.