edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors
Class CExExtractorUntilTrue
java.lang.Object
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.ExampleExtractor<T>
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.BatchExExtractor<T>
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.FilteredBatchExExtractor<T>
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.DocFilteredBatchExEx<CExample>
edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors.CExampleExtractorBasic
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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface LBJ2.parse.Parser |
close |
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
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.
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.