Interface Synset<S extends Sense,​E extends SynsetRelation,​T extends SynsetRelationType,​G extends Gloss,​X extends Example>

    • Method Detail

      • getPOS

        it.uniroma1.lcl.jlt.util.POS getPOS()
        Gets the part of speech of this Synset.
        Returns:
        the part of speech of this Synset.
      • getLanguages

        default Set<it.uniroma1.lcl.jlt.util.Language> getLanguages()
        Gets the set of languages used in this Synset.
        Returns:
        the set of languages used in this Synset.
      • getSenses

        List<S> getSenses()
        Get the senses contained in this Synset
        Returns:
        the senses of this synset.
      • getSenses

        List<S> getSenses​(it.uniroma1.lcl.jlt.util.Language language)
        Get the senses contained in this Synset for an input language
        Parameters:
        language - the language used to search
        Returns:
        the senses of this synset in a specific language.
      • getSenses

        List<S> getSenses​(SenseSource source)
        Get the senses contained in this Synset for an input sense source
        Parameters:
        source - the source of the senses to be retrieved
        Returns:
        the senses of this synset from an input sense source.
      • getSenses

        List<S> getSenses​(it.uniroma1.lcl.jlt.util.Language language,
                          SenseSource source)
        Get the senses contained in this Synset for an input language and sense source
        Parameters:
        language - the language used to search
        source - the source of the senses to be retrieved
        Returns:
        the senses of this synset from an input sense source.
      • getSenses

        default List<S> getSenses​(String lemma,
                                  it.uniroma1.lcl.jlt.util.Language language,
                                  SenseSource... sources)
        Gets the Senses for the input word in the given language
        Parameters:
        lemma - lemma of the sense
        language - language of the sense
        sources - possible sources for the sense
        Returns:
        the Senses for the input word in the given language
      • getSenses

        List<S> getSenses​(String lemma,
                          it.uniroma1.lcl.jlt.util.Language language,
                          boolean normalized,
                          SenseSource... sources)
        Gets the Senses for the input word in the given language
        Parameters:
        lemma - lemma of the sense
        language - language of the sense
        normalized - use normalization?
        sources - possible sources for the sense
        Returns:
        the Senses for the input word in the given language
      • retainSenses

        boolean retainSenses​(Predicate<? super S> predicate)
        Retains all the senses which pass the predicate test
        Parameters:
        predicate - the predicate used to decide whether to keep each sense in the synset
        Returns:
        true if at least one sense is left in the synset, false otherwise
      • retainSenses

        default boolean retainSenses​(List<Predicate<? super S>> predicates)
        Retains all the senses which pass the predicate tests
        Parameters:
        predicates - the predicates used to decide whether to keep each sense in the synset
        Returns:
        true if at least one sense is left in the synset, false otherwise
      • getMainGloss

        default Optional<G> getMainGloss()
        Get the main Gloss for this Synset.
        Returns:
        the main Gloss of the synset
      • getMainGloss

        Optional<G> getMainGloss​(it.uniroma1.lcl.jlt.util.Language lang)
        Get the main Gloss in the given languages for this Synset.
        Parameters:
        lang - the gloss language
        Returns:
        the Gloss for the input language
      • getGlosses

        List<G> getGlosses​(it.uniroma1.lcl.jlt.util.Language lang,
                           SenseSource source)
        Collects all Glosses in the given language and source for this Synset.
        Parameters:
        lang - the gloss language
        source - the gloss source
        Returns:
        all glosses of this Synset for the input source
      • getGlosses

        default List<G> getGlosses​(SenseSource source)
        Collects all Glosses in the given source for this Synset.
        Parameters:
        source - the gloss source
        Returns:
        all glosses of this Synset for the input source
      • getGlosses

        default List<G> getGlosses​(it.uniroma1.lcl.jlt.util.Language lang)
        Collects all Glosses in the given languages for this Synset.
        Parameters:
        lang - the gloss language
        Returns:
        all glosses of this Synset for the input language
      • getMainExample

        Optional<X> getMainExample​(it.uniroma1.lcl.jlt.util.Language lang)
        Get the main Example in the given language for this Synset.
        Parameters:
        lang - the example language
        Returns:
        the main Example for the input language
      • getExamples

        default List<X> getExamples​(it.uniroma1.lcl.jlt.util.Language lang)
        Collects all Examples in the given languages for this Synset.
        Parameters:
        lang - the example language
        Returns:
        all examples of this Synset for the input language
      • getExamples

        default List<X> getExamples​(SenseSource source)
        Collects all Examples in the given source for this Synset.
        Parameters:
        source - the example source
        Returns:
        all examples of this Synset for the input language and source
      • getExamples

        List<X> getExamples​(it.uniroma1.lcl.jlt.util.Language lang,
                            SenseSource source)
        Collects all Examples in the given language and source for this Synset.
        Parameters:
        lang - the example language
        source - the example source
        Returns:
        all examples of this Synset for the input language and source
      • getType

        SynsetType getType()
        Gets the type of this Synset, namely whether it's an entity, a concept, etc.
        Returns:
        the kind of Synset.
      • size

        int size()
        Returns the number of senses in the synset
        Returns:
        the number of senses in the synset
      • toURIs

        default List<String> toURIs​(ExternalResource resource)
        Returns the URIs of the various senses in the synset for a given ExternalResource
        Parameters:
        resource - the external resource
        Returns:
        the URIs to the external resource
      • toURIs

        default List<String> toURIs​(ExternalResource resource,
                                    it.uniroma1.lcl.jlt.util.Language... languages)
        Returns the URIs of the various senses in the given languages in the synset for a given ExternalResource
        Parameters:
        resource - the external resource
        languages - the languages of interest
        Returns:
        the URIs to the external resource
      • toURIs

        default List<String> toURIs​(ExternalResource resource,
                                    Collection<it.uniroma1.lcl.jlt.util.Language> languages)
        Returns the URIs of the various senses in the given languages in the synset for a given ExternalResource
        Parameters:
        resource - the external resource
        languages - the languages of interest
        Returns:
        the URIs to the external resource
      • addStringTag

        void addStringTag​(StringTag tag)