Class InternalBabelSynsetComparator

  • All Implemented Interfaces:
    Comparator<BabelSynset>
    Direct Known Subclasses:
    BabelSynsetComparator

    public class InternalBabelSynsetComparator
    extends Object
    implements Comparator<BabelSynset>
    Comparator for BabelSynsets that (a) puts WordNet synsets first; (b) sorts WordNet synsets based on the sense number of a specific input word (see the constructor); (c) sorts Wikipedia synsets based on their degree and lexicographically based on their main sense
    Author:
    navigli
    • Field Detail

      • lemma

        protected final String lemma
        The lemma used to sort synsets
      • language

        protected final it.uniroma1.lcl.jlt.util.Language language
        Language used to sort synsets
    • Constructor Detail

      • InternalBabelSynsetComparator

        public InternalBabelSynsetComparator()
        Creates a new instance of a InternalBabelSynsetComparator with sorting on the out-degree
      • InternalBabelSynsetComparator

        public InternalBabelSynsetComparator​(String word)
        Creates a new instance of a InternalBabelSynsetComparator with sorting on the English language
        Parameters:
        word - the word whose sense numbers are used to sort the BabelSynsets corresponding to WordNet synsets
      • InternalBabelSynsetComparator

        public InternalBabelSynsetComparator​(String word,
                                             it.uniroma1.lcl.jlt.util.Language language)
        Creates a new instance of a InternalBabelSynsetComparator
        Parameters:
        word - the word whose sense numbers are used to sort the BabelSynsets corresponding to WordNet synsets
        language - the language used to sort senses