Class InternalBabelSynsetComparator
java.lang.Object
it.uniroma1.lcl.babelnet.InternalBabelSynsetComparator
- All Implemented Interfaces:
Comparator<BabelSynset>
- Direct Known Subclasses:
BabelSynsetComparator
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of aInternalBabelSynsetComparatorwith sorting on the out-degreeCreates a new instance of aInternalBabelSynsetComparatorwith sorting on the English languageInternalBabelSynsetComparator(String word, it.uniroma1.lcl.jlt.util.Language language) Creates a new instance of aInternalBabelSynsetComparator -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
lemma
The lemma used to sort synsets -
language
protected final it.uniroma1.lcl.jlt.util.Language languageLanguage used to sort synsets
-
-
Constructor Details
-
InternalBabelSynsetComparator
public InternalBabelSynsetComparator()Creates a new instance of aInternalBabelSynsetComparatorwith sorting on the out-degree -
InternalBabelSynsetComparator
Creates a new instance of aInternalBabelSynsetComparatorwith sorting on the English language- Parameters:
word- the word whose sense numbers are used to sort theBabelSynsets corresponding to WordNet synsets
-
InternalBabelSynsetComparator
Creates a new instance of aInternalBabelSynsetComparator- Parameters:
word- the word whose sense numbers are used to sort theBabelSynsets corresponding to WordNet synsetslanguage- the language used to sort senses
-
-
Method Details
-
compareByEdgeThenMainSense
-
compare
- Specified by:
comparein interfaceComparator<BabelSynset>
-