|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.illinois.cs.cogcomp.lbj.coref.ir.MentionSpecificityComparator
public class MentionSpecificityComparator
Determines which mention is a more specific mention of an entity. Specificity is defined as having a more specific mention type Proper names are more specific than nominals, which are more specific than pronouns; or if not more specific, being longer. NOTE: Two mentions do not need to be coreferential for their specificities to be compared.
Constructor Summary | |
---|---|
MentionSpecificityComparator()
Constructs a mention specificity comparator. |
Method Summary | |
---|---|
int |
compare(Mention a,
Mention b)
Compares mentions by specificity in descending order. |
protected int |
compareBySpecificity(Mention a,
Mention b)
Determines which mention is more specific, in ascending order. |
protected boolean |
moreSpecificSameType(Mention a,
Mention b)
Determines whether a is more specific than b ,
given that they have the same mention type. |
protected boolean |
moreSpecificType(Mention a,
Mention b)
Determines whether a 's mention type
is strictly more specific than b 's. |
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 |
Constructor Detail |
---|
public MentionSpecificityComparator()
Method Detail |
---|
public int compare(Mention a, Mention b)
compare
in interface java.util.Comparator<Mention>
a
- A mention.b
- Another mention.
a
is more specific 0 if they are the same
and 1 if b
is more specific.protected int compareBySpecificity(Mention a, Mention b)
a
- A mention.b
- Another mention.
a
is strictly less specific than b
,
0 if their specificities are the same,
or 1 if a
is more specific.protected boolean moreSpecificSameType(Mention a, Mention b)
a
is more specific than b
,
given that they have the same mention type.
a
- A mention.b
- Another mention.
a
is strictly more specific that b
,
assuming their mention types are equivalent.protected boolean moreSpecificType(Mention a, Mention b)
a
's mention type
is strictly more specific than b
's.
Mention types, in decreasing order of specificity:
NAM, NOM, PRE, PRO, NONE
a
- A mention.b
- Another mention.
a
's mention type
is strictly more specific than b
's.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |