public class BabelSynsetComparator extends Object implements Comparator<BabelSynset>
Comparator
for BabelSynset
s 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
lexicographically based on their main senseConstructor and Description |
---|
BabelSynsetComparator()
Creates a new instance of a
BabelSynsetComparator with sorting on the OutEdge |
BabelSynsetComparator(String word)
Creates a new instance of a
BabelSynsetComparator with sorting on the English language |
BabelSynsetComparator(String word,
it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of a
BabelSynsetComparator |
Modifier and Type | Method and Description |
---|---|
int |
compare(BabelSynset b1,
BabelSynset b2) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public BabelSynsetComparator()
BabelSynsetComparator
with sorting on the OutEdgepublic BabelSynsetComparator(String word)
BabelSynsetComparator
with sorting on the English languageword
- the word whose sense numbers are used to sort the
BabelSynset
s corresponding to WordNet synsetspublic BabelSynsetComparator(String word, it.uniroma1.lcl.jlt.util.Language language)
BabelSynsetComparator
word
- the word whose sense numbers are used to sort the
BabelSynset
s corresponding to WordNet synsetslanguage
- the language used to sort sensespublic int compare(BabelSynset b1, BabelSynset b2)
compare
in interface Comparator<BabelSynset>
Copyright © 2016. All rights reserved.