edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors
Class CExExClosestPosAllNeg

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.ExampleExtractor<T>
      extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor<T>
          extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.FilteredBatchExExtractor<T>
              extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.DocFilteredBatchExEx<CExample>
                  extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.CExampleExtractorBasic
                      extended by edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.CExExClosestPosAllNeg
All Implemented Interfaces:
CExampleExtractor, DocExampleExtractor<CExample>, java.io.Serializable, LBJ2.parse.Parser

public class CExExClosestPosAllNeg
extends CExampleExtractorBasic
implements java.io.Serializable

Generates examples of coreference in the following way: For each mention, create a positive example with the nearest preceding coreferential mention, and create negative examples with each preceding non-coreferential mention. To generate examples, first set the document using setDoc() and then call generateAllExamples().

Author:
Eric Bengtson
See Also:
Serialized Form

Field Summary
protected  boolean m_allowNegProCata
           
protected  boolean m_allowPosProCata
           
protected  boolean m_dropHalfNeg
           
protected  boolean m_experimental
           
protected  java.util.Random m_rng
           
protected  boolean m_training
           
private static long serialVersionUID
           
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.DocFilteredBatchExEx
m_doc
 
Constructor Summary
CExExClosestPosAllNeg()
          Default constructor.
CExExClosestPosAllNeg(boolean allowPosProCata, boolean allowNegProCata)
          Constructor.
CExExClosestPosAllNeg(boolean allowPosProCata, boolean allowNegProCata, boolean dropHalfNeg)
          Constructor.
CExExClosestPosAllNeg(boolean allowPosProCata, boolean allowNegProCata, boolean dropHalfNeg, boolean training)
          Constructor.
CExExClosestPosAllNeg(boolean allowPosProCata, boolean allowNegProCata, boolean dropHalfNeg, boolean training, boolean experimental)
          Constructor.
 
Method Summary
protected  boolean equiv(Mention m1, Mention m2)
          Determines whether the mentions are the same according to entity ID.
protected  java.util.List<CExample> generateAllExamples()
          Generates a list of all the examples in the following way: For each mention, create a positive example with the nearest preceding coreferential mention, and create negative examples with each preceding non-coreferential mention.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.CExampleExtractorBasic
doFiltersAccept, getExample, setCFilter, setMFilter, setMFilters
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.DocFilteredBatchExEx
getDoc, setDoc
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.FilteredBatchExExtractor
getExamples, getFilterAccepted
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor
getNextCached, next, recordEquivalence, reset
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.ExampleExtractor
close, enqueue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.DocExampleExtractor
getDoc, getExamples, next, recordEquivalence, reset, setDoc
 
Methods inherited from interface LBJ2.parse.Parser
close
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

m_allowPosProCata

protected boolean m_allowPosProCata

m_allowNegProCata

protected boolean m_allowNegProCata

m_dropHalfNeg

protected boolean m_dropHalfNeg

m_training

protected boolean m_training

m_experimental

protected boolean m_experimental

m_rng

protected java.util.Random m_rng
Constructor Detail

CExExClosestPosAllNeg

public CExExClosestPosAllNeg()
Default constructor. Pronoun cataphora are allowed.


CExExClosestPosAllNeg

public CExExClosestPosAllNeg(boolean allowPosProCata,
                             boolean allowNegProCata)
Constructor.

Parameters:
allowPosProCata - Whether positive examples of pronoun cataphora are included.
allowNegProCata - Whether negative examples that would be pronoun cataphora are included.

CExExClosestPosAllNeg

public CExExClosestPosAllNeg(boolean allowPosProCata,
                             boolean allowNegProCata,
                             boolean dropHalfNeg)
Constructor.

Parameters:
allowPosProCata - Whether positive examples of pronoun cataphora are included.
allowNegProCata - Whether negative examples that would be pronoun cataphora are included.
dropHalfNeg - Whether to drop half of the negative examples.

CExExClosestPosAllNeg

public CExExClosestPosAllNeg(boolean allowPosProCata,
                             boolean allowNegProCata,
                             boolean dropHalfNeg,
                             boolean training)
Constructor.

Parameters:
allowPosProCata - Whether positive examples of pronoun cataphora are included.
allowNegProCata - Whether negative examples that would be pronoun cataphora are included.
dropHalfNeg - Whether to drop half of the negative examples.
training - Whether the classifier is training.

CExExClosestPosAllNeg

public CExExClosestPosAllNeg(boolean allowPosProCata,
                             boolean allowNegProCata,
                             boolean dropHalfNeg,
                             boolean training,
                             boolean experimental)
Constructor.

Parameters:
allowPosProCata - Whether positive examples of pronoun cataphora are included.
allowNegProCata - Whether negative examples that would be pronoun cataphora are included.
dropHalfNeg - Whether to drop half of the negative examples.
training - Whether the classifier is training.
experimental - Whether to operate in experimental mode.
Method Detail

generateAllExamples

protected java.util.List<CExample> generateAllExamples()
Generates a list of all the examples in the following way: For each mention, create a positive example with the nearest preceding coreferential mention, and create negative examples with each preceding non-coreferential mention. setDoc must be called before generating examples.

Overrides:
generateAllExamples in class CExampleExtractorBasic
Returns:
A list of examples.

equiv

protected boolean equiv(Mention m1,
                        Mention m2)
Determines whether the mentions are the same according to entity ID.

Parameters:
m1 - A mention.
m2 - Another mention.
Returns:
Whether the mentions have the same entity ID.