edu.illinois.cs.cogcomp.lbj.coref.features
Class ContextFeatures

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.features.ContextFeatures

public class ContextFeatures
extends java.lang.Object

Collection of features related to the context of one or more mentions. Especially see bothSpeakNearby(edu.illinois.cs.cogcomp.lbj.coref.ir.examples.CExample, int).


Constructor Summary
protected ContextFeatures()
          Should not need to construct this collection of static features.
 
Method Summary
static boolean bothSpeakNearby(CExample ex, int size)
          Determine whether both mentions have a word that is synonymous for "say" within size words of their extents.
protected static boolean contextWordInSet(java.util.Set<java.lang.String> words, Doc d, int s, int e)
          Determines whether a word in the document numbered between s and e inclusive is contained in words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextFeatures

protected ContextFeatures()
Should not need to construct this collection of static features.

Method Detail

bothSpeakNearby

public static boolean bothSpeakNearby(CExample ex,
                                      int size)
Determine whether both mentions have a word that is synonymous for "say" within size words of their extents.

Parameters:
ex - The example containing the mentions to examine.
size - The window size: the distance from the extent in which a word meaning "say" will be detected.
Returns:
Whether both mentions have a word meaning "say" nearby.

contextWordInSet

protected static boolean contextWordInSet(java.util.Set<java.lang.String> words,
                                          Doc d,
                                          int s,
                                          int e)
Determines whether a word in the document numbered between s and e inclusive is contained in words.

Parameters:
words - The set of words.
d - The document whose words will be inspected.
s - The number of the first word in the document to be inspected.
e - The number of the last word in the document to be inspected.