Package it.uniroma1.lcl.babelnet
Class BabelNetQuery
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.BabelNetQuery
-
- All Implemented Interfaces:
LKBQuery
public class BabelNetQuery extends Object implements LKBQuery
The class for a query to get synsets and senses from theBabelNet
class. UseBabelNetQuery.Builder
to build a query.- Author:
- navigli
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BabelNetQuery.Builder
Builder ofBabelNetQuery
objects.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
bNormalizedLemma
True if the search is insensitive to accents, etc.protected Set<String>
lemmas
Lemmas to use for restricting resultsprotected Set<BabelLemmaType>
lemmaTypes
Lemma types to use for searchprotected Set<it.uniroma1.lcl.jlt.util.POS>
poses
Parts of speech to use for restricting resultsprotected Set<ResourceID>
resourceIDs
Resource IDs for restricting resultsprotected Set<it.uniroma1.lcl.jlt.util.Language>
searchLanguages
Languages to use for searchprotected List<Predicate<? super BabelSense>>
senseFilters
Filters to be applied to each sense of each synset retrievedprotected Set<BabelSenseSource>
sources
Sources to use for restricting resultsprotected List<Predicate<? super BabelSynset>>
synsetFilters
Filters to be applied to each synset retrievedprotected Set<it.uniroma1.lcl.jlt.util.Language>
targetLanguages
Languages to use for populating results
-
Constructor Summary
Constructors Modifier Constructor Description protected
BabelNetQuery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
hasSenseFilters()
Returns true if the constraints include at least one sense filterprotected boolean
hasSynsetFilters()
Returns true if the constraints include at least one synset filterprotected boolean
testSynsetFilters(BabelSynset synset)
Tests all the synset filters against the input synset
-
-
-
Field Detail
-
searchLanguages
protected Set<it.uniroma1.lcl.jlt.util.Language> searchLanguages
Languages to use for search
-
targetLanguages
protected Set<it.uniroma1.lcl.jlt.util.Language> targetLanguages
Languages to use for populating results
-
sources
protected Set<BabelSenseSource> sources
Sources to use for restricting results
-
poses
protected Set<it.uniroma1.lcl.jlt.util.POS> poses
Parts of speech to use for restricting results
-
resourceIDs
protected Set<ResourceID> resourceIDs
Resource IDs for restricting results
-
bNormalizedLemma
protected boolean bNormalizedLemma
True if the search is insensitive to accents, etc.
-
synsetFilters
protected List<Predicate<? super BabelSynset>> synsetFilters
Filters to be applied to each synset retrieved
-
senseFilters
protected List<Predicate<? super BabelSense>> senseFilters
Filters to be applied to each sense of each synset retrieved
-
lemmaTypes
protected Set<BabelLemmaType> lemmaTypes
Lemma types to use for search
-
-
Method Detail
-
testSynsetFilters
protected boolean testSynsetFilters(BabelSynset synset)
Tests all the synset filters against the input synset- Parameters:
synset
- the synset to test filters against- Returns:
- true if all predicate-based filters return true
-
hasSynsetFilters
protected boolean hasSynsetFilters()
Returns true if the constraints include at least one synset filter- Returns:
- true if the constraints include at least one synset filter
-
hasSenseFilters
protected boolean hasSenseFilters()
Returns true if the constraints include at least one sense filter- Returns:
- true if the constraints include at least one sense filter
-
-