Package it.uniroma1.lcl.babelnet.data
Class BabelWordSenseComparator
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.BabelSenseComparator
-
- it.uniroma1.lcl.babelnet.data.BabelWordSenseComparator
-
- All Implemented Interfaces:
Comparator<BabelSense>
public class BabelWordSenseComparator extends BabelSenseComparator
BabelSenseComparatorforBabelSenses with precedence given to a certain word- Author:
- navigli, vannella
-
-
Constructor Summary
Constructors Constructor Description BabelWordSenseComparator(String word)Creates a new instance of aBabelWordSenseComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intsortByParentheses(BabelSense b1, BabelSense b2)Sorts two s by parenthesis (senses without parenthesis first)-
Methods inherited from class it.uniroma1.lcl.babelnet.BabelSenseComparator
compare
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Constructor Detail
-
BabelWordSenseComparator
public BabelWordSenseComparator(String word)
Creates a new instance of aBabelWordSenseComparator- Parameters:
word- the word whose sense numbers are used to sort theBabelSense
-
-
Method Detail
-
sortByParentheses
protected int sortByParentheses(BabelSense b1, BabelSense b2)
Description copied from class:BabelSenseComparatorSorts two s by parenthesis (senses without parenthesis first)- Overrides:
sortByParenthesesin classBabelSenseComparator- Parameters:
b1- the first senseb2- the second sense- Returns:
- the order (standard format for
Comparators)
-
-