Class BabelNetQuery.Builder

    • Constructor Detail

      • Builder

        public Builder​(ResourceID resourceID)
        Adds the resource ID for search
        Parameters:
        resourceID - the resource ID to add
      • Builder

        public Builder​(ResourceID... resourceIDs)
        Adds the resource IDs for search
        Parameters:
        resourceIDs - the resources ID to add
      • Builder

        public Builder​(Collection<? extends ResourceID> resourceIDs)
        Adds the resource IDs for search
        Parameters:
        resourceIDs - the resources ID to add
      • Builder

        public Builder​(String lemma)
        Adds a lemma for search
        Parameters:
        lemma - the lemma to search
      • Builder

        public Builder​(String... lemmas)
        Adds lemmas for search
        Parameters:
        lemmas - the lemmas to search
    • Method Detail

      • from

        public BabelNetQuery.Builder from​(it.uniroma1.lcl.jlt.util.Language lang)
        Sets the search language
        Parameters:
        lang - language to search BabelNet
        Returns:
        the builder
      • from

        public BabelNetQuery.Builder from​(it.uniroma1.lcl.jlt.util.Language... langs)
        Sets the search languages
        Parameters:
        langs - languages to search BabelNet
        Returns:
        the builder
      • from

        public BabelNetQuery.Builder from​(Collection<it.uniroma1.lcl.jlt.util.Language> langs)
        Sets the search languages
        Parameters:
        langs - language collection to search BabelNet
        Returns:
        the builder
      • toSameLanguages

        public BabelNetQuery.Builder toSameLanguages()
        Sets the target languages to the same as the search languages
        Returns:
        the builder
      • toAllLanguages

        public BabelNetQuery.Builder toAllLanguages()
        Sets all languages as target languages
        Returns:
        the builder
      • to

        public BabelNetQuery.Builder to​(it.uniroma1.lcl.jlt.util.Language lang)
        Sets the target language to build synsets with
        Parameters:
        lang - language to build synsets with
        Returns:
        the builder
      • to

        public BabelNetQuery.Builder to​(it.uniroma1.lcl.jlt.util.Language... langs)
        Sets the target languages to build synsets with
        Parameters:
        langs - languages to build synsets with
        Returns:
        the builder
      • to

        public BabelNetQuery.Builder to​(Collection<it.uniroma1.lcl.jlt.util.Language> langs)
        Sets the target language collection to build synsets with
        Parameters:
        langs - language collection to build synsets with
        Returns:
        the builder
      • source

        public BabelNetQuery.Builder source​(BabelSenseSource source)
        Sets the source for the synset search
        Parameters:
        source - the synset source for the search
        Returns:
        the builder
      • sources

        public BabelNetQuery.Builder sources​(BabelSenseSource... sources)
        Sets the sources for the synset search
        Parameters:
        sources - the synset sources for the search
        Returns:
        the builder
      • POS

        public BabelNetQuery.Builder POS​(it.uniroma1.lcl.jlt.util.POS pos)
        Sets the POS for the synset search
        Parameters:
        pos - the synset POS for the search
        Returns:
        the builder
      • POS

        public BabelNetQuery.Builder POS​(it.uniroma1.lcl.jlt.util.POS... poses)
        Sets the POSes for the synset search
        Parameters:
        poses - the synset POSes for the search
        Returns:
        the builder
      • POS

        public BabelNetQuery.Builder POS​(Collection<? extends it.uniroma1.lcl.jlt.util.POS> poses)
        Sets the POS collection for the synset search
        Parameters:
        poses - the synset POS collection for the search
        Returns:
        the builder
      • normalized

        public BabelNetQuery.Builder normalized​(boolean bNormalized)
        Sets the normalization for lemma search
        Parameters:
        bNormalized - true if accents etc. should be disregarded during lookup, false otherwise
        Returns:
        the builder
      • filterSynsets

        public BabelNetQuery.Builder filterSynsets​(Predicate<BabelSynset> synsetFilter)
        Sets a filter for each synset retrieved
        Parameters:
        synsetFilter - synset predicate
        Returns:
        the builder
      • filterSenses

        public BabelNetQuery.Builder filterSenses​(Predicate<BabelSense> senseFilter)
        Sets a filter for each sense in each synset retrieved
        Parameters:
        senseFilter - sense predicate
        Returns:
        the builder
      • tag

        public BabelNetQuery.Builder tag​(Tag... tags)
        Sets the Tags for the synset search
        Parameters:
        tags - the Tags for the search
        Returns:
        the builder