edu.illinois.cs.cogcomp.lbj.coref.decoders
Class ExtendHeadsDecoder
java.lang.Object
edu.illinois.cs.cogcomp.lbj.coref.decoders.DecoderWithOptions<MentionSolution>
edu.illinois.cs.cogcomp.lbj.coref.decoders.MentionDecoder
edu.illinois.cs.cogcomp.lbj.coref.decoders.ExtendHeadsDecoder
- All Implemented Interfaces:
- SolutionDecoder<MentionSolution>
public class ExtendHeadsDecoder
- extends MentionDecoder
A decoder for determining the extents of the mentions, given their
heads as chunks.
|
Constructor Summary |
ExtendHeadsDecoder(LBJ2.classify.Classifier extender,
ChunkDecoder headDecoder)
Constructs a decoder using an extender classifier that
takes an ExtendHeadExample representing a word and a chunk
and returns "true" if the word represented by the example
should be part of the extent of chunk. |
|
Method Summary |
MentionSolution |
decode(Doc doc)
Applies a classifier to chunks to determine their extents
and decode these decisions into a MentionSolution. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_headDecoder
protected ChunkDecoder m_headDecoder
- Decodes the heads
m_extendClassifier
protected LBJ2.classify.Classifier m_extendClassifier
- Given a head, determines whether a word is part of its extent.
ExtendHeadsDecoder
public ExtendHeadsDecoder(LBJ2.classify.Classifier extender,
ChunkDecoder headDecoder)
- Constructs a decoder using an
extender classifier that
takes an ExtendHeadExample representing a word and a chunk
and returns "true" if the word represented by the example
should be part of the extent of chunk.
The chunks to be extended will be derived using the headDecoder.
- Parameters:
extender - The classifier to decide whether a given word should
be part of a given chunk.headDecoder - The decoder used to derive the head chunks.
decode
public MentionSolution decode(Doc doc)
- Applies a classifier to chunks to determine their extents
and decode these decisions into a
MentionSolution.
The chunks will be discovered by the provided headDecoder.
The resulting mentions do not have their metadata set.
- Specified by:
decode in interface SolutionDecoder<MentionSolution>- Specified by:
decode in class MentionDecoder
- Parameters:
doc - The document whose mentions should be determined.
- Returns:
- The mentions detected in the document, encoded as
a
MentionSolution.