Class BabelNet
java.lang.Object
it.uniroma1.lcl.babelnet.BabelNet
- All Implemented Interfaces:
LKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>, Iterable<BabelSynset>
public abstract class BabelNet
extends Object
implements LKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>
A class to programmatically access BabelNet.
- Author:
- navigli, vannella, cecconi
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static it.uniroma1.lcl.babelnet.BabelNetIndexManagerLucene index manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected it.uniroma1.lcl.babelnet.BabelNetIndexManagerReturns theBabelNetIndexManagerstatic BabelNetReturns the singleton instance of theBabelNetclassprotected abstract List<BabelSynsetRelation> Returns the outgoing edges from a givenBabelSynsetIDprotected abstract List<BabelSynsetRelation> getOutgoingEdges(BabelSynsetID id, Collection<it.uniroma1.lcl.jlt.util.Language> searchLangs) Deprecated.Deprecated.Deprecated.Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized, BabelSenseSource... allowedSources) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource... allowedSources) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages, boolean normalized) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language sourceLanguage, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages, boolean normalized, BabelSenseSource... allowedSources) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, BabelSenseSource... allowedSources) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages) Deprecated.getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages, boolean normalized) Deprecated.getSensesContaining(String word) Returns the senses of synsets containing the word in any language.getSensesContaining(String word, it.uniroma1.lcl.jlt.util.Language language) Returns the senses of synsets containing the word in the given language.getSensesContaining(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Returns the senses of synsets containing the word with the given constraints.getSensesFrom(String word) Returns the senses of synsets containing the word in any language.getSensesFrom(String word, it.uniroma1.lcl.jlt.util.Language language) Returns the senses of synsets containing the word in the given language.getSensesFrom(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Returns the senses of synsets containing the word with the given constraints.getSynset(ResourceID resourceID) Given aResourceID, returns the synset identified by the ResourceID in input.getSynset(Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, ResourceID resourceID) Deprecated.Deprecated.Please useLKB.iterator().getSynsets(ResourceID... resourceIds) Given a list ofResourceIDs, returns the synsets identified by the ResourceIDs in input.getSynsets(String word) Given a word, returns the synsets for the word.getSynsets(String word, boolean normalized) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language) Given a word in a certain language, returns the synsets for the word.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, boolean normalized) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Given a word in a certain language, returns the synsets for the word.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> searchLangs) Given a word and a collection of languages, returns the senses for the word available in the given sense sources.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, boolean normalized) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> searchLangs, it.uniroma1.lcl.jlt.util.POS pos) Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, BabelSenseSource... allowedSources) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.getSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, ResourceID... resourceIds) Deprecated.Returns the full stream of the WordNetBabelSynsetsStream<it.uniroma1.lcl.jlt.ling.Word> Returns the full stream ofBabelSynsetsReturns the full stream of string offsets ofBabelSynsetsReturns the full stream ofBabelSensessenseStream(BabelSenseSource source) Returns the full stream ofBabelSenses belonging to a givenBabelSenseSourcesenseStream(it.uniroma1.lcl.jlt.util.Language language) Returns the full stream ofBabelSenses in a givenLanguagesenseStream(it.uniroma1.lcl.jlt.util.Language language, BabelSenseSource source) Returns the full stream ofBabelSenses with the given constraintsstream()Returns the full stream ofBabelSynsetsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface LKB
getLexiconIterator, getOffsetIterator, getSensesContaining, getSensesFrom, getSynsets, getVersion, getWordNetSynsetIterator, iterator, toSynsets, toSynsets
-
Field Details
-
indexManager
protected static it.uniroma1.lcl.babelnet.BabelNetIndexManager indexManagerLucene index manager
-
-
Constructor Details
-
BabelNet
protected BabelNet()BabelNet default constructor
-
-
Method Details
-
getInstance
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, boolean normalized) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.normalized- enables normalized search- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.searchLanguage- the language of the input word.targetLanguages- the languages in which the data are to be retrieved.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages, boolean normalized) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.searchLanguage- the language of the input word.targetLanguages- the languages in which the data are to be retrieved.normalized- enables normalized search- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.searchLanguage- the language of the input word.pos- the PoS of the word.targetLanguages- the languages in which the data are to be retrieved.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language searchLanguage, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages, boolean normalized) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.searchLanguage- the language of the input word.pos- the PoS of the word.targetLanguages- the languages in which the data are to be retrieved.normalized- enables normalized search- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource... allowedSources) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.pos- the PoS of the word.allowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized, BabelSenseSource... allowedSources) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
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- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, BabelSenseSource... allowedSources) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.pos- the PoS of the word.targetLangs- the languages in which the data are to be retrieved.allowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language sourceLanguage, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLanguages, boolean normalized, BabelSenseSource... allowedSources) Deprecated.Returns the senses for the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.sourceLanguage- the language of the input word.pos- the PoS of the word.targetLanguages- the languages in which the data are to be retrieved.normalized- enables normalized searchallowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the senses of the word.
-
getSensesFrom
Description copied from interface:LKBReturns the senses of synsets containing the word in any language.- Specified by:
getSensesFromin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.- Returns:
- the senses of the word.
-
getSensesFrom
Description copied from interface:LKBReturns the senses of synsets containing the word in the given language.- Specified by:
getSensesFromin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.- Returns:
- the senses of the word.
-
getSensesFrom
public List<BabelSense> getSensesFrom(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Description copied from interface:LKBReturns the senses of synsets containing the word with the given constraints.- Specified by:
getSensesFromin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.pos- the PoS of the word.- Returns:
- the senses of the word.
-
getSensesContaining
Description copied from interface:LKBReturns the senses of synsets containing the word in any language.- Specified by:
getSensesContainingin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.- Returns:
- the senses of the word.
-
getSensesContaining
public List<BabelSense> getSensesContaining(String word, it.uniroma1.lcl.jlt.util.Language language) Description copied from interface:LKBReturns the senses of synsets containing the word in the given language.- Specified by:
getSensesContainingin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.- Returns:
- the senses of the word.
-
getSensesContaining
public List<BabelSense> getSensesContaining(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Description copied from interface:LKBReturns the senses of synsets containing the word with the given constraints.- Specified by:
getSensesContainingin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.pos- the PoS of the word.- Returns:
- the senses of the word.
-
getSenses
Deprecated.Returns the senses of synsets containing the word in any language.- Parameters:
word- the word whose senses are to be retrieved.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language) Deprecated.Returns the senses of synsets containing the word in the given language.- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.- Returns:
- the senses of the word.
-
getSenses
@Deprecated public List<BabelSense> getSenses(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Deprecated.Returns the senses of synsets containing the word with the given constraints.- Parameters:
word- the word whose senses are to be retrieved.language- the language of the input word.pos- the PoS of the word.- Returns:
- the senses of the word.
-
getSynsets
Description copied from interface:LKBGiven a word, returns the synsets for the word.- Specified by:
getSynsetsin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose synsets are to be retrieved.- Returns:
- the synsets of the word.
-
getSynsets
Description copied from interface:LKBGiven a word in a certain language, returns the synsets for the word.- Specified by:
getSynsetsin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.- Returns:
- the synsets of the word.
-
getSynsets
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos) Description copied from interface:LKBGiven a word in a certain language, returns the synsets for the word.- Specified by:
getSynsetsin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.- Returns:
- the synsets of the word.
-
getSynsets
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> searchLangs) Description copied from interface:LKBGiven a word and a collection of languages, returns the senses for the word available in the given sense sources.- Specified by:
getSynsetsin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose senses are to be retrieved.searchLangs- a collection of languages that can be used to look up the input word.- Returns:
- the senses of the word.
-
getSynsets
public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> searchLangs, it.uniroma1.lcl.jlt.util.POS pos) Description copied from interface:LKBGiven a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Specified by:
getSynsetsin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
word- the word whose synsets are to be retrieved.searchLangs- a collection of languages that can be used to look up the input word.pos- the PoS of the word.- Returns:
- the synsets of the word.
-
getSynsets
Description copied from interface:LKBGiven a list ofResourceIDs, returns the synsets identified by the ResourceIDs in input.- Specified by:
getSynsetsin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
resourceIds- the resource identifiers- Returns:
- the synsets identified by the given
ResourceIDs
-
getSynset
Description copied from interface:LKBGiven aResourceID, returns the synset identified by the ResourceID in input.Note: It is possible that this method gives a warning if the
ResourceIDreturns more than one synset. In that case the best (seeInternalBabelSynsetComparator) sense will be returned.- Specified by:
getSynsetin interfaceLKB<BabelSynset, BabelSense, BabelSynsetRelation, BabelPointer, BabelGloss, BabelExample, BabelNetQuery>- Parameters:
resourceID- the resource identifier- Returns:
- the synset identified by the
ResourceIDSome examples that can be used follow, assuming:
BabelNet bn = BabelNet.getInstance();
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"));
-
getSynsets
Deprecated.Given a word, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, boolean normalized) Deprecated.Given a word in a certain language, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.Given a word in a certain language, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.targetLangs- the languages in which the data are to be retrieved.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.Given a word in a certain language, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.targetLangs- the languages in which the data are to be retrieved.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, boolean normalized) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.langs- a collection of languages that can be used to look up the input word.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.langs- a collection of languages that can be used to look up the input word.targetLangs- the languages in which the data are to be retrieved.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.langs- a collection of languages that can be used to look up the input word.targetLangs- the languages in which the data are to be retrieved.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized) Deprecated.Given a word in a certain language, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.Given a word in a certain language, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.targetLangs- the languages in which the data are to be retrieved.- Returns:
- the synsets of the word.
-
getSynsets
public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.Given a word in a certain language, returns the synsets for the word.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.targetLangs- the languages in which the data are to be retrieved.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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 search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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.targetLangs- the languages in which the data are to be retrieved.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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.targetLangs- the languages in which the data are to be retrieved.normalized- enables normalized search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource... allowedSources) Deprecated.Given a word in a certain language, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.allowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized, BabelSenseSource... allowedSources) Deprecated.Given a word in a certain language, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.normalized- enables normalized searchallowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, BabelSenseSource... allowedSources) Deprecated.Given a word in a certain language, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.targetLangs- the languages in which the data are to be retrieved.allowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, it.uniroma1.lcl.jlt.util.Language language, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized, BabelSenseSource... allowedSources) Deprecated.Given a word in a certain language, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets are to be retrieved.language- the language of the input word.pos- the PoS of the word.targetLangs- the languages in which the data are to be retrieved.normalized- enables normalized searchallowedSources- sources used to search- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, BabelSenseSource... allowedSources) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, boolean normalized, BabelSenseSource... allowedSources) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, BabelSenseSource... allowedSources) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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.targetLangs- the languages in which the data are to be retrieved.allowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(String word, Collection<it.uniroma1.lcl.jlt.util.Language> langs, it.uniroma1.lcl.jlt.util.POS pos, Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, boolean normalized, BabelSenseSource... allowedSources) Deprecated.Given a word and a collection of languages, returns the synsets for the word available in the given sense sources.- Parameters:
word- the word whose synsets 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.targetLangs- the languages in which the data are to be retrieved.normalized- enables normalized searchallowedSources- theBabelSenseSources that can be used to look up the possible senses of the input word.- Returns:
- the synsets of the word.
-
getSynsets
@Deprecated public List<BabelSynset> getSynsets(Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, ResourceID... resourceIds) Deprecated.Given a list ofResourceIDs, returns the synsets identified by the ResourceIDs in input.- Parameters:
targetLangs- the languages in which the data are to be retrieved.resourceIds- the resource identifiers- Returns:
- the synsets identified by the given
ResourceIDs
-
getSynset
@Deprecated public BabelSynset getSynset(Collection<it.uniroma1.lcl.jlt.util.Language> targetLangs, ResourceID resourceID) Deprecated.Given aResourceID, returns the synset identified by the ResourceID in input.Note: It is possible that this method gives a warning if the
ResourceIDreturns more than one synset. In that case the best (seeInternalBabelSynsetComparator) sense will be returned.- Parameters:
targetLangs- the languages in which the data are to be retrieved.resourceID- the resource identifier- Returns:
- the synset identified by the
ResourceID
-
getOutgoingEdges
@Deprecated protected abstract List<BabelSynsetRelation> getOutgoingEdges(BabelSynsetID id, Collection<it.uniroma1.lcl.jlt.util.Language> searchLangs) Deprecated.Returns the outgoing edges from a givenBabelSynsetID- Parameters:
id- theBabelSynsetIDwhose outgoing edges we want to retrievesearchLangs- the search languages of the edges- Returns:
- the list of relation edges
-
getOutgoingEdges
Returns the outgoing edges from a givenBabelSynsetID- Parameters:
id- theBabelSynsetIDwhose outgoing edges we want to retrieve- Returns:
- the list of relation edges
-
getSynsetIterator
Deprecated.Please useLKB.iterator().Creates a new instance ofBabelSynsetIterator.- Returns:
- an instance of a
BabelSynsetIterator.
-
stream
Returns the full stream ofBabelSynsets- Returns:
- the stream of
BabelSynsets
-
lexiconStream
Returns the full stream ofBabelSynsets- Returns:
- the stream of
BabelSynsets
-
offsetStream
Returns the full stream of string offsets ofBabelSynsets- Returns:
- the stream of
BabelSynsets
-
getWordNetStream
Returns the full stream of the WordNetBabelSynsets- Returns:
- the stream of the WordNet
BabelSynsets
-
senseStream
Returns the full stream ofBabelSenses- Returns:
- the stream of
BabelSenses
-
senseStream
Returns the full stream ofBabelSenses in a givenLanguage- Parameters:
language- the language of the senses- Returns:
- the stream of
BabelSenses
-
senseStream
Returns the full stream ofBabelSenses belonging to a givenBabelSenseSource- Parameters:
source- the source of the senses- Returns:
- the stream of
BabelSenses
-
senseStream
public Stream<BabelSense> senseStream(it.uniroma1.lcl.jlt.util.Language language, BabelSenseSource source) Returns the full stream ofBabelSenses with the given constraints- Parameters:
language- the language of the sensessource- the source of the senses- Returns:
- the stream of
BabelSenses
-
getIndexManager
protected it.uniroma1.lcl.babelnet.BabelNetIndexManager getIndexManager()Returns theBabelNetIndexManager- Returns:
- the
BabelNetIndexManager
-
getOutgoingEdges(BabelSynsetID)