public class BabelSenseComparator extends Object implements Comparator<BabelSense>
Comparator for BabelSenses that (a) puts WordNet senses
first; (b) sorts WordNet senses based on their sense number;
(c) sorts Wikipedia senses based on their degree and lexicographically| Constructor 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, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongprotected int sortByParentheses(BabelSense b1, BabelSense b2)
b1 - the first senseb2 - the second senseComparators)public int compare(BabelSense b1, BabelSense b2)
compare in interface Comparator<BabelSense>Copyright © 2016–2022. All rights reserved.