Class BabelNetQuery.Builder
java.lang.Object
it.uniroma1.lcl.babelnet.BabelNetQuery.Builder
- Enclosing class:
BabelNetQuery
Builder of
BabelNetQuery objects.- Author:
- navigli
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder(ResourceID resourceID) Adds the resource ID for searchBuilder(ResourceID... resourceIDs) Adds the resource IDs for searchAdds a lemma for searchAdds lemmas for searchBuilder(Collection<? extends ResourceID> resourceIDs) Adds the resource IDs for search -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a configured instance ofBabelNetQueryfilterSenses(Predicate<BabelSense> senseFilter) Sets a filter for each sense in each synset retrievedfilterSynsets(Predicate<BabelSynset> synsetFilter) Sets a filter for each synset retrievedfrom(it.uniroma1.lcl.jlt.util.Language lang) Sets the search languagefrom(it.uniroma1.lcl.jlt.util.Language... langs) Sets the search languagesfrom(Collection<it.uniroma1.lcl.jlt.util.Language> langs) Sets the search languageslemmaType(BabelLemmaType... lemmaType) Sets theBabelLemmaTypes for the synset searchnormalized(boolean bNormalized) Sets the normalization for lemma searchPOS(it.uniroma1.lcl.jlt.util.POS pos) Sets the POS for the synset searchPOS(it.uniroma1.lcl.jlt.util.POS... poses) Sets the POSes for the synset searchPOS(Collection<? extends it.uniroma1.lcl.jlt.util.POS> poses) Sets the POS collection for the synset searchsource(BabelSenseSource source) Sets the source for the synset searchsources(BabelSenseSource... sources) Sets the sources for the synset searchsources(Collection<BabelSenseSource> sources) Sets the source collection for the synset searchsources(Predicate<BabelSenseSource> sourceFilter) Sets a filter for each sources in each synset retrievedSets theTags for the synset searchtag(Collection<Tag> tags) Sets the collection ofTags for the synset searchto(it.uniroma1.lcl.jlt.util.Language lang) Sets the target language to build synsets withto(it.uniroma1.lcl.jlt.util.Language... langs) Sets the target languages to build synsets withto(Collection<it.uniroma1.lcl.jlt.util.Language> langs) Sets the target language collection to build synsets withSets all languages as target languagesSets the target languages to the same as the search languages
-
Constructor Details
-
Builder
Adds the resource ID for search- Parameters:
resourceID- the resource ID to add
-
Builder
Adds the resource IDs for search- Parameters:
resourceIDs- the resources ID to add
-
Builder
Adds the resource IDs for search- Parameters:
resourceIDs- the resources ID to add
-
Builder
-
Builder
-
-
Method Details
-
from
Sets the search language- Parameters:
lang- language to search BabelNet- Returns:
- the builder
-
from
Sets the search languages- Parameters:
langs- languages to search BabelNet- Returns:
- the builder
-
from
Sets the search languages- Parameters:
langs- language collection to search BabelNet- Returns:
- the builder
-
toSameLanguages
Sets the target languages to the same as the search languages- Returns:
- the builder
-
toAllLanguages
Sets all languages as target languages- Returns:
- the builder
-
to
Sets the target language to build synsets with- Parameters:
lang- language to build synsets with- Returns:
- the builder
-
to
Sets the target languages to build synsets with- Parameters:
langs- languages to build synsets with- Returns:
- the builder
-
to
Sets the target language collection to build synsets with- Parameters:
langs- language collection to build synsets with- Returns:
- the builder
-
source
Sets the source for the synset search- Parameters:
source- the synset source for the search- Returns:
- the builder
-
sources
Sets the sources for the synset search- Parameters:
sources- the synset sources for the search- Returns:
- the builder
-
sources
Sets the source collection for the synset search- Parameters:
sources- the synset source collection for the search- Returns:
- the builder
-
sources
Sets a filter for each sources in each synset retrieved- Parameters:
sourceFilter- source predicate- Returns:
- the builder
-
POS
Sets the POS for the synset search- Parameters:
pos- the synset POS for the search- Returns:
- the builder
-
POS
Sets the POSes for the synset search- Parameters:
poses- the synset POSes for the search- Returns:
- the builder
-
POS
Sets the POS collection for the synset search- Parameters:
poses- the synset POS collection for the search- Returns:
- the builder
-
normalized
Sets the normalization for lemma search- Parameters:
bNormalized- true if accents etc. should be disregarded during lookup, false otherwise- Returns:
- the builder
-
filterSynsets
Sets a filter for each synset retrieved- Parameters:
synsetFilter- synset predicate- Returns:
- the builder
-
filterSenses
Sets a filter for each sense in each synset retrieved- Parameters:
senseFilter- sense predicate- Returns:
- the builder
-
lemmaType
Sets theBabelLemmaTypes for the synset search- Parameters:
lemmaType- lemma types- Returns:
- the builder
-
tag
-
tag
-
build
Builds a configured instance ofBabelNetQuery- Returns:
- the query object
-