|
||||||||||
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.features.AlignedTokenFeatures
public class AlignedTokenFeatures
Collection of feature generating functions that compare or return aligned tokens.
Constructor Summary | |
---|---|
private |
AlignedTokenFeatures()
No need to construct collection of features. |
Method Summary | |
---|---|
static boolean |
aligned(java.lang.String a,
java.lang.String b)
Determines whether two strings should be aligned; strings should be aligned if they share hypernyms, are both countries, both cities, both first names, or both last names. |
static java.lang.String[] |
getWNAlignedPairRelations(CExample ex)
Extracts the relations between the aligned words returned by getWNAlignedPreModifierPairs() |
static java.lang.String[] |
getWNAlignedPairRelations(java.util.List<Pair<java.lang.String,java.lang.String>> pairs)
Computes the relations between pairs of words. |
static java.util.List<Pair<java.lang.String,java.lang.String>> |
getWNAlignedPreModifierPairs(CExample ex)
Aligns each word a in the first mention before its head
to each word b in the second mention's extent
that is aligned to a according to aligned(java.lang.String, java.lang.String) . |
static java.util.List<java.lang.String> |
getWNAlignedPreModifiers(CExample ex)
Gets the aligned words conjoined as strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
private AlignedTokenFeatures()
Method Detail |
---|
public static java.util.List<java.lang.String> getWNAlignedPreModifiers(CExample ex)
ex
- The example whose mentions will have their words aligned.
getWNAlignedPreModifierPairs(edu.illinois.cs.cogcomp.lbj.coref.ir.examples.CExample)
.public static java.util.List<Pair<java.lang.String,java.lang.String>> getWNAlignedPreModifierPairs(CExample ex)
a
in the first mention before its head
to each word b
in the second mention's extent
that is aligned to a
according to aligned(java.lang.String, java.lang.String)
.
public static boolean aligned(java.lang.String a, java.lang.String b)
a
- One string.b
- Another string.
public static java.lang.String[] getWNAlignedPairRelations(CExample ex)
getWNAlignedPreModifierPairs()
ex
- The example containing the mentions whose relationship
will be computed.
public static java.lang.String[] getWNAlignedPairRelations(java.util.List<Pair<java.lang.String,java.lang.String>> pairs)
pairs
- The word pairs; a relation will be computed for each pair.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |