edu.illinois.cs.cogcomp.lbj.coref.exampleExtractors
Class CExExClosestPosAllNeg
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.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
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 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_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
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.
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.