edu.illinois.cs.cogcomp.lbj.coref.ir.examples
Class ExtendHeadExample

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.ir.examples.Example
      extended by edu.illinois.cs.cogcomp.lbj.coref.ir.examples.WordExample
          extended by edu.illinois.cs.cogcomp.lbj.coref.ir.examples.ExtendHeadExample

public class ExtendHeadExample
extends WordExample

Represents an example of a word associated with some head, used to determine whether the word is part of the extent of that head's mention. Holds a head and a label indicating whether the word is in the extent.

Author:
Eric Bengtson

Field Summary
protected  Chunk m_head
          The head associated with this example.
 boolean m_in
          Label indicating whether the example word is in the head.
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.examples.WordExample
m_doc, m_numWords, m_wordN
 
Constructor Summary
ExtendHeadExample(Doc doc, Chunk head, int wordN)
          Constructs an example representing a word in a document, and a head: The example may or may not be a word in the extent associated with the given head.
ExtendHeadExample(Doc doc, Chunk head, int wordN, boolean in)
          Constructs an example representing a word in a document, and a head, and a label indicating whether the word is part of the extent corresponding to the given head.
 
Method Summary
 Chunk getHead()
          Gets the head associated with this example.
 boolean isInExtent()
          Gets the label indicating whether this example's word is part of the extent associated with this example's head.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.examples.WordExample
getCasedWord, getCasedWord, getDoc, getPOS, getPOS, getWord, getWord, getWordCase, getWordCase, getWordCase, getWordNum
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.ir.examples.Example
getLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_in

public boolean m_in
Label indicating whether the example word is in the head.


m_head

protected Chunk m_head
The head associated with this example.

Constructor Detail

ExtendHeadExample

public ExtendHeadExample(Doc doc,
                         Chunk head,
                         int wordN,
                         boolean in)
Constructs an example representing a word in a document, and a head, and a label indicating whether the word is part of the extent corresponding to the given head.

Parameters:
doc - The document containing the word.
head - The head associated with the extent of some mention.
wordN - The (zero-based) word number of the word in the document.
in - The label, indicating whether the given word is part of the extent associated with the given head.

ExtendHeadExample

public ExtendHeadExample(Doc doc,
                         Chunk head,
                         int wordN)
Constructs an example representing a word in a document, and a head: The example may or may not be a word in the extent associated with the given head.

Parameters:
doc - The document containing the word.
head - The head associated with the extent of some mention.
wordN - The (zero-based) word number of the word in the document.
Method Detail

getHead

public Chunk getHead()
Gets the head associated with this example.

Returns:
The head.

isInExtent

public boolean isInExtent()
Gets the label indicating whether this example's word is part of the extent associated with this example's head. Note that if the label has not been set, the result of this method is undefined.

Returns:
Whether the example word is a member of the extent associated with this example's head, or undefined if not specified.