edu.illinois.cs.cogcomp.lbj.coref.decoders
Class CorefDecoder
java.lang.Object
edu.illinois.cs.cogcomp.lbj.coref.decoders.DecoderWithOptions<ST>
edu.illinois.cs.cogcomp.lbj.coref.decoders.ChainSolutionDecoder<ChainSolution<Mention>,Mention,CExample>
edu.illinois.cs.cogcomp.lbj.coref.decoders.CorefDecoder
- All Implemented Interfaces:
- SolutionDecoder<ChainSolution<Mention>>, java.io.Serializable
- Direct Known Subclasses:
- ScoredCorefDecoder
public abstract class CorefDecoder
- extends ChainSolutionDecoder<ChainSolution<Mention>,Mention,CExample>
- implements java.io.Serializable
Translates coreference decisions to a ChainSolution via the decode
method. Accepts a classifier that determines coreference of
CExample
objects by returning "true" or "false".
Any parameters of the classifier should be set before constructing.
For compatibility with code that loads dynamically (such as the GUI),
subclasses should provide a constructor that takes
just a Classifier
.
Exception: Classes that need more specific inputs to function
may omit this constructor, provided they comply with the subclass
constructor requirements. (Currently, see ScoredCorefDecoder
).
- Author:
- Eric Bengtson
- See Also:
- Serialized Form
Constructor Summary |
CorefDecoder(LBJ2.classify.Classifier c)
Construct a coreference decoder that uses a single classifier. |
Method Summary |
LBJ2.classify.Classifier |
getClassifier()
Gets the coreference classifier. |
protected boolean |
predictedCoreferential(CExample ex)
Indicates whether the member classifier considers the example
to be coreferential. |
void |
setClassifier(LBJ2.classify.Classifier classifier)
Sets the coreference classifier. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
m_classifier
protected LBJ2.classify.Classifier m_classifier
- The default classifier
CorefDecoder
public CorefDecoder(LBJ2.classify.Classifier c)
- Construct a coreference decoder that uses a single classifier.
- Parameters:
c
- A classifier that takes CExample
s
and returns a "true" or "false".
Any parameters (such as any threshold) are assumed to have been set.
getClassifier
public LBJ2.classify.Classifier getClassifier()
- Gets the coreference classifier.
- Returns:
- The classifier.
setClassifier
public void setClassifier(LBJ2.classify.Classifier classifier)
- Sets the coreference classifier.
- Parameters:
classifier
- The classifier.
predictedCoreferential
protected boolean predictedCoreferential(CExample ex)
- Indicates whether the member classifier considers the example
to be coreferential.
Override to modify coreference behavior to use other decision strategies.
- Parameters:
ex
- The example whose coreference should be determined.
- Returns:
- Whether the example is coreferential.