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| Modifier and Type | Field and Description |
|---|---|
protected it.uniroma1.lcl.jlt.util.Language |
language
Language used to sort synsets
|
protected String |
lemma
The lemma used to sort synsets
|
| Constructor and Description |
|---|
InternalBabelSynsetComparator()
Creates a new instance of a
InternalBabelSynsetComparator with sorting on the out-degree |
InternalBabelSynsetComparator(String word)
Creates a new instance of a
InternalBabelSynsetComparator with sorting on the English language |
InternalBabelSynsetComparator(String word,
it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of a
InternalBabelSynsetComparator |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(BabelSynset b1,
BabelSynset b2) |
protected int |
compareByEdgeThenMainSense(BabelSynset b1,
BabelSynset b2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongprotected final String lemma
protected final it.uniroma1.lcl.jlt.util.Language language
public InternalBabelSynsetComparator()
InternalBabelSynsetComparator with sorting on the out-degreepublic InternalBabelSynsetComparator(String word)
InternalBabelSynsetComparator with sorting on the English languageword - the word whose sense numbers are used to sort the
BabelSynsets corresponding to WordNet synsetspublic InternalBabelSynsetComparator(String word, it.uniroma1.lcl.jlt.util.Language language)
InternalBabelSynsetComparatorword - the word whose sense numbers are used to sort the
BabelSynsets corresponding to WordNet synsetslanguage - the language used to sort sensesprotected int compareByEdgeThenMainSense(BabelSynset b1, BabelSynset b2)
public int compare(BabelSynset b1, BabelSynset b2)
compare in interface Comparator<BabelSynset>Copyright © 2016–2022. All rights reserved.