public class BabelSenseComparator extends Object implements Comparator<BabelSense>
Comparator
for BabelSense
s that (a) puts WordNet senses
first; (b) sorts WordNet senses based on their sense number;
(c) sorts Wikipedia senses based on their degree and lexicographicallyConstructor and Description |
---|
BabelSenseComparator() |
Modifier and Type | Method and Description |
---|---|
int |
compare(BabelSense b1,
BabelSense b2) |
protected int |
sortByParentheses(BabelSense b1,
BabelSense b2)
Sorts two s by parenthesis (senses without parenthesis first)
|
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
protected int sortByParentheses(BabelSense b1, BabelSense b2)
b1
- the first senseb2
- the second senseComparator
s)public int compare(BabelSense b1, BabelSense b2)
compare
in interface Comparator<BabelSense>
Copyright © 2016–2021. All rights reserved.