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 |
normalized(boolean bNormalized)
Sets the normalization for lemma search
|
BabelNetQuery.Builder |
POS(Collection<? extends com.babelscape.util.POS> poses)
Sets the POS collection for the synset search
|
BabelNetQuery.Builder |
POS(com.babelscape.util.POS... poses)
Sets the POSes for the synset search
|
BabelNetQuery.Builder |
POS(com.babelscape.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 |
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 POS(com.babelscape.util.POS pos)
pos
- the synset POS for the searchpublic BabelNetQuery.Builder POS(com.babelscape.util.POS... poses)
poses
- the synset POSes for the searchpublic BabelNetQuery.Builder POS(Collection<? extends com.babelscape.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 build()
BabelNetQuery
Copyright © 2016–2018. All rights reserved.