Class BabelExampleComparator
java.lang.Object
it.uniroma1.lcl.babelnet.data.BabelExampleComparator
- All Implemented Interfaces:
Comparator<BabelExample>
Comparator for BabelExamples which sorts by sources.- Author:
- navigli
-
Constructor Summary
ConstructorsConstructorDescriptionCreates the example comparatorBabelExampleComparator(BabelSense mainSense) Creates the example comparator with the sense the examples refer to -
Method Summary
Modifier and TypeMethodDescriptionintcompare(BabelExample b1, BabelExample b2) Sort examples by language and sourceMethods 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
-
BabelExampleComparator
Creates the example comparator with the sense the examples refer to- Parameters:
mainSense- the sense the examples refer to
-
BabelExampleComparator
public BabelExampleComparator()Creates the example comparator
-
-
Method Details
-
compare
Sort examples by language and source- Specified by:
comparein interfaceComparator<BabelExample>
-