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

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.CExExtractorUntilTrue
All Implemented Interfaces:
CExampleExtractor, DocExampleExtractor<CExample>, java.io.Serializable, LBJ2.parse.Parser

public class CExExtractorUntilTrue
extends CExampleExtractorBasic
implements java.io.Serializable

FIXME: This code should inherit from an onlineCExample class

See Also:
Serialized Form

Field Summary
private  boolean m_bTraining
           
private  int m_iM1
           
private  int m_iM2
           
private  int m_nNegEx
           
private  int m_nPosEx
           
private static long serialVersionUID
           
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.DocFilteredBatchExEx
m_doc
 
Constructor Summary
CExExtractorUntilTrue(boolean training)
           
CExExtractorUntilTrue(CFilter filter, boolean training)
           
CExExtractorUntilTrue(CFilter cFilter, MFilter mFilter, boolean bBothMentions, boolean training)
           
CExExtractorUntilTrue(CFilter cFilter, MFilter m1Filter, MFilter m2Filter, boolean training)
          The order of the MFilters matters here.
CExExtractorUntilTrue(Doc doc, CFilter filter, boolean training)
           
 
Method Summary
protected  void advance()
          Move to the next example (if necessary, moving to the next m2)
protected  void advanceToNextM2()
          Move the slower moving example.
private  CExample finished()
           
 java.util.List<CExample> getExamples()
          WARNING: Resets state.
 CExample getNext()
          When bTraining is false, you must manually call recordEquivalence() afterwards if the predictor predicts positive.
 void recordEquivalence()
          Does nothing, since extractor is a batch extractor.
 void reset()
          Reset the extractor.
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.CExampleExtractorBasic
doFiltersAccept, generateAllExamples, 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
getFilterAccepted
 
Methods inherited from class edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor
getNextCached, next
 
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, next, setDoc
 
Methods inherited from interface LBJ2.parse.Parser
close
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

m_iM1

private int m_iM1

m_iM2

private int m_iM2

m_nNegEx

private int m_nNegEx

m_nPosEx

private int m_nPosEx

m_bTraining

private boolean m_bTraining
Constructor Detail

CExExtractorUntilTrue

public CExExtractorUntilTrue(boolean training)
Parameters:
training - Indicates whether the system is being trained: When training=true, the system expects Entity IDs to be valid and recordEquivalence not to be called; When training=false, recordEquivalence must be called, and nothing is presumed about Entity IDs.

CExExtractorUntilTrue

public CExExtractorUntilTrue(CFilter filter,
                             boolean training)

CExExtractorUntilTrue

public CExExtractorUntilTrue(Doc doc,
                             CFilter filter,
                             boolean training)

CExExtractorUntilTrue

public CExExtractorUntilTrue(CFilter cFilter,
                             MFilter mFilter,
                             boolean bBothMentions,
                             boolean training)
Parameters:
bBothMentions - if true, requires that both mentions be accepted by the filter if the example is to be generated.

CExExtractorUntilTrue

public CExExtractorUntilTrue(CFilter cFilter,
                             MFilter m1Filter,
                             MFilter m2Filter,
                             boolean training)
The order of the MFilters matters here.

Method Detail

reset

public void reset()
Description copied from class: BatchExExtractor
Reset the extractor. After calling this method, next() should begin returning examples starting with the first example.

Specified by:
reset in interface DocExampleExtractor<CExample>
Specified by:
reset in interface LBJ2.parse.Parser
Overrides:
reset in class BatchExExtractor<CExample>

getExamples

public java.util.List<CExample> getExamples()
WARNING: Resets state.

Specified by:
getExamples in interface DocExampleExtractor<CExample>
Overrides:
getExamples in class FilteredBatchExExtractor<CExample>
Returns:
the examples that next() will return, which are filtered.

getNext

public CExample getNext()
When bTraining is false, you must manually call recordEquivalence() afterwards if the predictor predicts positive. NOTE: This code expects ID to be set to NONE at eval time.


finished

private CExample finished()

recordEquivalence

public void recordEquivalence()
Description copied from class: BatchExExtractor
Does nothing, since extractor is a batch extractor.

Specified by:
recordEquivalence in interface DocExampleExtractor<CExample>
Overrides:
recordEquivalence in class BatchExExtractor<CExample>

advance

protected void advance()
Move to the next example (if necessary, moving to the next m2)


advanceToNextM2

protected void advanceToNextM2()
Move the slower moving example.