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 the BabelNet class. Use BabelNetQuery.Builder to build a query.
Author:
navigli
  • Field Details

    • lemmas

      protected Set<String> lemmas
      Lemmas to use for restricting results
    • 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
  • Constructor Details

    • BabelNetQuery

      protected BabelNetQuery()
  • Method Details

    • 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