Class BabelGloss

  • All Implemented Interfaces:
    Gloss

    public class BabelGloss
    extends Object
    implements Gloss
    A gloss in BabelNet.
    Author:
    navigli, ponzetto
    • Constructor Detail

      • BabelGloss

        public BabelGloss​(BabelSenseSource source,
                          int sourceSense,
                          it.uniroma1.lcl.jlt.util.Language language,
                          String gloss,
                          Set<BabelTokenId> tokens)
        Creates a new instance of a BabelGloss
        Parameters:
        source - the gloss source
        sourceSense - the sense the gloss defines
        language - the language the gloss is written in
        gloss - the gloss string
        tokens - the tokens that belong to the gloss
      • BabelGloss

        public BabelGloss​(BabelSenseSource source,
                          int sourceSense,
                          it.uniroma1.lcl.jlt.util.Language language,
                          String gloss)
        Creates a new instance of a BabelGloss
        Parameters:
        source - the gloss source
        sourceSense - the sense the gloss defines
        language - the language the gloss is written in
        gloss - the gloss string
    • Method Detail

      • getSource

        public BabelSenseSource getSource()
        Description copied from interface: Gloss
        The region where the concept for this gloss lies.
        Specified by:
        getSource in interface Gloss
        Returns:
        the region where the gloss concept lies
      • getSourceSense

        public int getSourceSense()
        The WordNet or Wikipedia sense from which this gloss is taken
        Returns:
        the corresponding sense for the gloss
      • getLanguage

        public it.uniroma1.lcl.jlt.util.Language getLanguage()
        Description copied from interface: Gloss
        The language for this gloss
        Specified by:
        getLanguage in interface Gloss
        Returns:
        the gloss language
      • getGloss

        public String getGloss()
        Description copied from interface: Gloss
        Returns the gloss
        Specified by:
        getGloss in interface Gloss
        Returns:
        the gloss content as a String.
      • getTokensId

        public Set<BabelTokenId> getTokensId()
        Deprecated.
        use getTokenIds() instead.
        Returns the list of BabelTokenIds. Each BabelTokenId is the association between the lemma that appears in this Babel gloss, and the BabelSynset id that identifies the lemma in BabelNet.
        Returns:
        the BabelTokenIds for this gloss
      • getTokenIds

        public Set<BabelTokenId> getTokenIds()
        Returns the list of BabelTokenIds. Each BabelTokenId is the association between the lemma that appears in this Babel gloss, and the BabelSynset id that identifies the lemma in BabelNet.
        Returns:
        the BabelTokenIds for this gloss