Class BabelWordSenseComparator
java.lang.Object
it.uniroma1.lcl.babelnet.BabelSenseComparator
it.uniroma1.lcl.babelnet.data.BabelWordSenseComparator
- All Implemented Interfaces:
Comparator<BabelSense>
BabelSenseComparator for BabelSenses with precedence given to a certain word- Author:
- navigli, vannella
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected intsortByParentheses(BabelSense b1, BabelSense b2) Sorts twoBabelSenses by parenthesis (senses without parenthesis first)Methods inherited from class BabelSenseComparator
compareMethods 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
-
Constructor Details
-
BabelWordSenseComparator
Creates a new instance of aBabelWordSenseComparator- Parameters:
word- the word whose sense numbers are used to sort theBabelSense
-
-
Method Details
-
sortByParentheses
Description copied from class:BabelSenseComparatorSorts twoBabelSenses by parenthesis (senses without parenthesis first)- Overrides:
sortByParenthesesin classBabelSenseComparator- Parameters:
b1- the first senseb2- the second sense- Returns:
- the order (standard format for
Comparators)
-