Package it.uniroma1.lcl.babelnet.data
Class BabelSynsetRelationComparator
- java.lang.Object
-
- it.uniroma1.lcl.babelnet.data.BabelSynsetRelationComparator
-
- All Implemented Interfaces:
Comparator<BabelSynset>
public class BabelSynsetRelationComparator extends Object implements Comparator<BabelSynset>
Comparator
forBabelSynset
s that (a) sorts Babel synsets using theirs relations number (b) sorts usingInternalBabelSynsetComparator
- Author:
- vannella
-
-
Constructor Summary
Constructors Constructor Description BabelSynsetRelationComparator(String word)
Creates a new instance of aBabelSynsetRelationComparator
with sorting on the English languageBabelSynsetRelationComparator(String word, it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of aBabelSynsetRelationComparator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(BabelSynset b1, BabelSynset b2)
-
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
-
BabelSynsetRelationComparator
public BabelSynsetRelationComparator(String word)
Creates a new instance of aBabelSynsetRelationComparator
with sorting on the English language- Parameters:
word
- the word whose sense numbers are used to sort theBabelSynset
s corresponding to WordNet synsets
-
BabelSynsetRelationComparator
public BabelSynsetRelationComparator(String word, it.uniroma1.lcl.jlt.util.Language language)
Creates a new instance of aBabelSynsetRelationComparator
- Parameters:
word
- the word whose sense numbers are used to sort theBabelSynset
s corresponding to WordNet synsetslanguage
- the language used to sort senses
-
-
Method Detail
-
compare
public int compare(BabelSynset b1, BabelSynset b2)
- Specified by:
compare
in interfaceComparator<BabelSynset>
-
-