public static class BabelNetQuery.Builder extends Object
BabelNetQuery objects.| Constructor and Description |
|---|
Builder(Collection<? extends ResourceID> resourceIDs)
Adds the resource IDs for search
|
Builder(ResourceID... resourceIDs)
Adds the resource IDs for search
|
Builder(ResourceID resourceID)
Adds the resource ID for search
|
Builder(String... lemmas)
Adds lemmas for search
|
Builder(String lemma)
Adds a lemma for search
|
| Modifier and Type | Method and Description |
|---|---|
BabelNetQuery |
build()
Builds a configured instance of
BabelNetQuery |
BabelNetQuery.Builder |
filterSenses(Predicate<BabelSense> senseFilter)
Sets a filter for each sense in each synset retrieved
|
BabelNetQuery.Builder |
filterSynsets(Predicate<BabelSynset> synsetFilter)
Sets a filter for each synset retrieved
|
BabelNetQuery.Builder |
from(Collection<it.uniroma1.lcl.jlt.util.Language> langs)
Sets the search languages
|
BabelNetQuery.Builder |
from(it.uniroma1.lcl.jlt.util.Language... langs)
Sets the search languages
|
BabelNetQuery.Builder |
from(it.uniroma1.lcl.jlt.util.Language lang)
Sets the search language
|
BabelNetQuery.Builder |
lemmaType(BabelLemmaType... lemmaType)
Sets the
BabelLemmaTypes for the synset search |
BabelNetQuery.Builder |
normalized(boolean bNormalized)
Sets the normalization for lemma search
|
BabelNetQuery.Builder |
POS(Collection<? extends it.uniroma1.lcl.jlt.util.POS> poses)
Sets the POS collection for the synset search
|
BabelNetQuery.Builder |
POS(it.uniroma1.lcl.jlt.util.POS... poses)
Sets the POSes for the synset search
|
BabelNetQuery.Builder |
POS(it.uniroma1.lcl.jlt.util.POS pos)
Sets the POS for the synset search
|
BabelNetQuery.Builder |
source(BabelSenseSource source)
Sets the source for the synset search
|
BabelNetQuery.Builder |
sources(BabelSenseSource... sources)
Sets the sources for the synset search
|
BabelNetQuery.Builder |
sources(Collection<BabelSenseSource> sources)
Sets the source collection for the synset search
|
BabelNetQuery.Builder |
sources(Predicate<BabelSenseSource> sourceFilter)
Sets a filter for each sources in each synset retrieved
|
BabelNetQuery.Builder |
tag(Collection<Tag> tags)
Sets the collection of
Tags for the synset search |
BabelNetQuery.Builder |
tag(Tag... tags)
Sets the
Tags for the synset search |
BabelNetQuery.Builder |
to(Collection<it.uniroma1.lcl.jlt.util.Language> langs)
Sets the target language collection to build synsets with
|
BabelNetQuery.Builder |
to(it.uniroma1.lcl.jlt.util.Language... langs)
Sets the target languages to build synsets with
|
BabelNetQuery.Builder |
to(it.uniroma1.lcl.jlt.util.Language lang)
Sets the target language to build synsets with
|
BabelNetQuery.Builder |
toAllLanguages()
Sets all languages as target languages
|
BabelNetQuery.Builder |
toSameLanguages()
Sets the target languages to the same as the search languages
|
public Builder(ResourceID resourceID)
resourceID - the resource ID to addpublic Builder(ResourceID... resourceIDs)
resourceIDs - the resources ID to addpublic Builder(Collection<? extends ResourceID> resourceIDs)
resourceIDs - the resources ID to addpublic Builder(String lemma)
lemma - the lemma to searchpublic Builder(String... lemmas)
lemmas - the lemmas to searchpublic BabelNetQuery.Builder from(it.uniroma1.lcl.jlt.util.Language lang)
lang - language to search BabelNetpublic BabelNetQuery.Builder from(it.uniroma1.lcl.jlt.util.Language... langs)
langs - languages to search BabelNetpublic BabelNetQuery.Builder from(Collection<it.uniroma1.lcl.jlt.util.Language> langs)
langs - language collection to search BabelNetpublic BabelNetQuery.Builder toSameLanguages()
public BabelNetQuery.Builder toAllLanguages()
public BabelNetQuery.Builder to(it.uniroma1.lcl.jlt.util.Language lang)
lang - language to build synsets withpublic BabelNetQuery.Builder to(it.uniroma1.lcl.jlt.util.Language... langs)
langs - languages to build synsets withpublic BabelNetQuery.Builder to(Collection<it.uniroma1.lcl.jlt.util.Language> langs)
langs - language collection to build synsets withpublic BabelNetQuery.Builder source(BabelSenseSource source)
source - the synset source for the searchpublic BabelNetQuery.Builder sources(BabelSenseSource... sources)
sources - the synset sources for the searchpublic BabelNetQuery.Builder sources(Collection<BabelSenseSource> sources)
sources - the synset source collection for the searchpublic BabelNetQuery.Builder sources(Predicate<BabelSenseSource> sourceFilter)
sourceFilter - source predicatepublic BabelNetQuery.Builder POS(it.uniroma1.lcl.jlt.util.POS pos)
pos - the synset POS for the searchpublic BabelNetQuery.Builder POS(it.uniroma1.lcl.jlt.util.POS... poses)
poses - the synset POSes for the searchpublic BabelNetQuery.Builder POS(Collection<? extends it.uniroma1.lcl.jlt.util.POS> poses)
poses - the synset POS collection for the searchpublic BabelNetQuery.Builder normalized(boolean bNormalized)
bNormalized - true if accents etc. should be disregarded during lookup, false otherwisepublic BabelNetQuery.Builder filterSynsets(Predicate<BabelSynset> synsetFilter)
synsetFilter - synset predicatepublic BabelNetQuery.Builder filterSenses(Predicate<BabelSense> senseFilter)
senseFilter - sense predicatepublic BabelNetQuery.Builder lemmaType(BabelLemmaType... lemmaType)
BabelLemmaTypes for the synset searchlemmaType - lemma typespublic BabelNetQuery.Builder tag(Collection<Tag> tags)
Tags for the synset searchtags - the collection of Tags for the searchpublic BabelNetQuery.Builder tag(Tag... tags)
Tags for the synset searchtags - the Tags for the searchpublic BabelNetQuery build()
BabelNetQueryCopyright © 2016–2022. All rights reserved.