public abstract class BabelNet extends Object
Modifier and Type | Method and Description |
---|---|
protected abstract List<BabelExample> |
getExamples(BabelSynsetID id,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
it.uniroma1.lcl.babelnet.InternalBabelSynsetID... ids)
Get the examples of a specific
BabelSynset , given a set identifier InternalBabelSynsetID and a
BabelSynsetID |
protected abstract List<BabelGloss> |
getGlosses(BabelSynsetID id,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
it.uniroma1.lcl.babelnet.InternalBabelSynsetID... ids)
Get the glosses of a specific
BabelSynset , given a set identifier InternalBabelSynsetID and a
BabelSynsetID |
protected abstract List<BabelImage> |
getImages(BabelSynsetID id)
Get the images of a specific
BabelSynset , given a BabelSynsetID |
static BabelNet |
getInstance()
Used to access
BabelNet |
abstract BabelLexiconIterator |
getLexiconIterator()
Creates a new instance of
BabelLexiconIterator . |
abstract BabelOffsetIterator |
getOffsetIterator()
Creates a new instance of
BabelOffsetIterator . |
List<BabelSense> |
getSenses(it.uniroma1.lcl.jlt.util.Language language,
String word)
Deprecated.
use
getSenses(String, Language) instead. |
List<BabelSense> |
getSenses(it.uniroma1.lcl.jlt.util.Language language,
String word,
BabelPOS pos)
Deprecated.
use
getSenses(String, Language, BabelPOS) instead. |
List<BabelSense> |
getSenses(it.uniroma1.lcl.jlt.util.Language language,
String word,
BabelPOS pos,
BabelSenseSource... allowedSources)
Deprecated.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
BabelSenseSource... allowedSources)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
boolean normalized,
BabelSenseSource... allowedSources)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
BabelSenseSource... allowedSources)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized)
Returns the senses for the word with the given constraints.
|
abstract List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized,
BabelSenseSource... allowedSources)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
boolean normalized)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Returns the senses for the word with the given constraints.
|
List<BabelSense> |
getSenses(String word,
it.uniroma1.lcl.jlt.util.Language language,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized)
Returns the senses for the word with the given constraints.
|
protected abstract List<BabelSynsetIDRelation> |
getSuccessorEdges(BabelSynsetID id,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Given a
BabelSynsetID , collects the successor BabelSynsetIDRelation of the
concept denoted by the id |
abstract BabelSynset |
getSynset(Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
ResourceID resourceID)
Given a
ResourceID , returns the sense identified by the ResourceID in input. |
BabelSynset |
getSynset(ResourceID resourceID)
Given a
ResourceID , returns the sense identified by the ResourceID in input. |
abstract BabelSynsetIterator |
getSynsetIterator()
Creates a new instance of
BabelSynsetIterator . |
abstract List<BabelSynset> |
getSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
ResourceID... resourceId)
Given a list of
ResourceID s, returns the senses identified by the ResourceIDs in input. |
List<BabelSynset> |
getSynsets(it.uniroma1.lcl.jlt.util.Language language,
String word)
Deprecated.
use
getSynsets(String, Language) instead. |
List<BabelSynset> |
getSynsets(it.uniroma1.lcl.jlt.util.Language language,
String word,
BabelPOS pos)
Deprecated.
use
getSynsets(String, Language, BabelPOS) instead. |
List<BabelSynset> |
getSynsets(it.uniroma1.lcl.jlt.util.Language language,
String word,
BabelPOS pos,
BabelSenseSource... allowedSources)
Deprecated.
|
List<BabelSynset> |
getSynsets(ResourceID... resourceId)
Given a list of
ResourceID s, returns the senses identified by the ResourceIDs in input. |
List<BabelSynset> |
getSynsets(String word)
Given a word, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
boolean normalized)
Given a word, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
BabelSenseSource... allowedSources)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
boolean normalized)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
boolean normalized,
BabelSenseSource... allowedSources)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
BabelSenseSource... allowedSources)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
abstract List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized,
BabelSenseSource... allowedSources) |
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
boolean normalized)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
Collection<it.uniroma1.lcl.jlt.util.Language> langs,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized)
Given a word and a collection of languages, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
BabelSenseSource... allowedSources)
Given a word in a certain language, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
boolean normalized)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
boolean normalized,
BabelSenseSource... allowedSources)
Given a word in a certain language, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
BabelSenseSource... allowedSources)
Given a word in a certain language, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
BabelPOS pos,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized,
BabelSenseSource... allowedSources)
Given a word in a certain language, returns the senses for the word available in the given sense sources.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
boolean normalized)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsets(String word,
it.uniroma1.lcl.jlt.util.Language language,
Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs,
boolean normalized)
Given a word in a certain language, returns the senses for the word.
|
List<BabelSynset> |
getSynsetsFromWikipediaTitle(it.uniroma1.lcl.jlt.util.Language language,
String title,
BabelPOS pos)
Deprecated.
use
getSynsets(ResourceID... resourceId) instead.
Example: List<BabelSynset> synset = bn.getSynsets(new WikipediaID("BabelNet", Language.EN, BabelPOS.NOUN)); |
abstract BabelVersion |
getVersion()
Gets the version of loaded BabelNet indices
|
public static BabelNet getInstance()
BabelNet
BabelNet
@Deprecated public List<BabelSense> getSenses(it.uniroma1.lcl.jlt.util.Language language, String word) throws IOException
getSenses(String, Language)
instead.language
- the language of the input word.word
- the word whose senses are to be retrieved.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.normalized
- enables normalized searchIOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.filterLangs
- the languages in which the data are to be retrieved.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
@Deprecated public List<BabelSense> getSenses(it.uniroma1.lcl.jlt.util.Language language, String word, BabelPOS pos) throws IOException
getSenses(String, Language, BabelPOS)
instead.language
- the language of the input word.word
- the word whose senses are to be retrieved.pos
- the PoS of the word.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
@Deprecated public List<BabelSense> getSenses(it.uniroma1.lcl.jlt.util.Language language, String word, BabelPOS pos, BabelSenseSource... allowedSources) throws IOException
getSenses(String, Language, BabelPOS, BabelSenseSource...)
instead.language
- the language of the input word.word
- the word whose senses are to be retrieved.pos
- the PoS of the word.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, boolean normalized, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.normalized
- enables normalized searchallowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public abstract List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchallowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word) throws IOException
word
- the word whose senses are to be retrieved.IOException
public List<BabelSynset> getSynsets(String word, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.normalized
- enables normalized searchIOException
@Deprecated public List<BabelSynset> getSynsets(it.uniroma1.lcl.jlt.util.Language language, String word) throws IOException
getSynsets(String, Language)
instead.language
- the language of the input word.word
- the word whose senses are to be retrieved.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.filterLangs
- the languages in which the data are to be retrieved.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.IOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.filterLangs
- the languages in which the data are to be retrieved.IOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
@Deprecated public List<BabelSynset> getSynsets(it.uniroma1.lcl.jlt.util.Language language, String word, BabelPOS pos) throws IOException
getSynsets(String, Language, BabelPOS)
instead.language
- the language of the input word.word
- the word whose senses are to be retrieved.pos
- the PoS of the word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.IOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.IOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
@Deprecated public List<BabelSynset> getSynsets(it.uniroma1.lcl.jlt.util.Language language, String word, BabelPOS pos, BabelSenseSource... allowedSources) throws IOException
getSynsets(String, Language, BabelPOS, BabelSenseSource...)
instead.language
- the language of the input word.word
- the word whose senses are to be retrieved.pos
- the PoS of the word.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, boolean normalized, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.normalized
- enables normalized searchallowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.language
- the language of the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.normalized
- enables normalized searchIOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, boolean normalized, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.normalized
- enables normalized searchallowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, BabelSenseSource... allowedSources) throws IOException
word
- the word whose senses are to be retrieved.langs
- a collection of languages that can be used to look up the input word.pos
- the PoS of the word.filterLangs
- the languages in which the data are to be retrieved.allowedSources
- the BabelSenseSource
s that can be used to look up
the possible senses of the input word.IOException
public abstract List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, BabelPOS pos, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, boolean normalized, BabelSenseSource... allowedSources) throws IOException
IOException
@Deprecated public List<BabelSynset> getSynsetsFromWikipediaTitle(it.uniroma1.lcl.jlt.util.Language language, String title, BabelPOS pos) throws IOException
getSynsets(ResourceID... resourceId)
instead.
Example:
List<BabelSynset> synset = bn.getSynsets(new WikipediaID("BabelNet", Language.EN, BabelPOS.NOUN));
BabelSynset
s which contain it.language
- the language of the input Wikipedia title.title
- the language of the Wikipedia page.pos
- the PoS of the Wikipedia title.BabelSynset
s associated to the given Wikipedia titleIOException
public abstract BabelVersion getVersion()
BabelVersion
of BabelNet indicespublic BabelSynset getSynset(ResourceID resourceID) throws IOException
ResourceID
, returns the sense identified by the ResourceID in input.
Note: It is possible that this method gives a warning if the ResourceID
returns more than one synset. In that case
the best (see BabelSynsetComparator
) sense will be returned.
resourceId
- the resource identifierResourceID
IOException
- Below, some more examples that can be used:
Retrieving BabelSynset from a Wikipedia page title:
BabelSynset synset = bn.getSynset(new WikipediaID("BabelNet", Language.EN, BabelPOS.NOUN));
Retrieving BabelSynset from a Wikiquote page title:
BabelSynset synset = bn.getSynset(new WikiquoteID("Home", Language.EN, BabelPOS.NOUN));
Retrieving BabelSynset from a WordNet id:
BabelSynset synset = bn.getSynset(new WordNetSynsetID("wn:03544360n"));
Retrieving BabelSynset from a Wikidata page id:
BabelSynset synset = bn.getSynset(new WikidataID("Q4837690"));
Retrieving BabelSynset from a OmegaWiki page id:
BabelSynset synset = bn.getSynset(new OmegaWikiID("1499705"));
public abstract BabelSynset getSynset(Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, ResourceID resourceID) throws IOException
ResourceID
, returns the sense identified by the ResourceID in input.
Note: It is possible that this method gives a warning if the ResourceID
returns more than one synset. In that case
the best (see BabelSynsetComparator
) sense will be returned.
filterLangs
- the languages in which the data are to be retrieved.resourceId
- the resource identifierResourceID
IOException
public List<BabelSynset> getSynsets(ResourceID... resourceId) throws IOException
ResourceID
s, returns the senses identified by the ResourceIDs in input.resourceId
- the resource identifiersResourceID
sIOException
public abstract List<BabelSynset> getSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, ResourceID... resourceId) throws IOException
ResourceID
s, returns the senses identified by the ResourceIDs in input.filterLangs
- the languages in which the data are to be retrieved.resourceId
- the resource identifiersResourceID
sIOException
protected abstract List<BabelExample> getExamples(BabelSynsetID id, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, it.uniroma1.lcl.babelnet.InternalBabelSynsetID... ids) throws IOException
BabelSynset
, given a set identifier InternalBabelSynsetID
and a
BabelSynsetID
id,
- id of BabelNetfilterLangs
- the languages in which the data are to be retrieved.ids,
- ids of LicenseBabelSynset
IOException
protected abstract List<BabelImage> getImages(BabelSynsetID id) throws IOException
BabelSynset
, given a BabelSynsetID
id
- BabelSynset
IOException
protected abstract List<BabelGloss> getGlosses(BabelSynsetID id, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs, it.uniroma1.lcl.babelnet.InternalBabelSynsetID... ids) throws IOException
BabelSynset
, given a set identifier InternalBabelSynsetID
and a
BabelSynsetID
id,
- id of BabelNetfilterLangs
- the languages in which the data are to be retrieved.ids,
- ids of LicenseBabelSynset
IOException
protected abstract List<BabelSynsetIDRelation> getSuccessorEdges(BabelSynsetID id, Collection<it.uniroma1.lcl.jlt.util.Language> filterLangs) throws IOException
BabelSynsetID
, collects the successor BabelSynsetIDRelation
of the
concept denoted by the idconcept
- a concept identifier BabelSynsetID
filterLangs
- the languages in which the data are to be retrieved.IOException
public abstract BabelSynsetIterator getSynsetIterator()
BabelSynsetIterator
.BabelSynsetIterator
.IOException
public abstract BabelOffsetIterator getOffsetIterator()
BabelOffsetIterator
.BabelOffsetIterator
.IOException
public abstract BabelLexiconIterator getLexiconIterator()
BabelLexiconIterator
.BabelLexiconIterator
.IOException
Copyright © 2016. All rights reserved.