edu.illinois.cs.cogcomp.lbj.coref.decoders
Class ExtendHeadsDecoder

java.lang.Object
  extended by edu.illinois.cs.cogcomp.lbj.coref.decoders.DecoderWithOptions<MentionSolution>
      extended by edu.illinois.cs.cogcomp.lbj.coref.decoders.MentionDecoder
          extended by 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.


Field Summary
protected  LBJ2.classify.Classifier m_extendClassifier
          Given a head, determines whether a word is part of its extent.
protected  ChunkDecoder m_headDecoder
          Decodes the heads
 
Fields inherited from class edu.illinois.cs.cogcomp.lbj.coref.decoders.DecoderWithOptions
m_options, m_train
 
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 edu.illinois.cs.cogcomp.lbj.coref.decoders.DecoderWithOptions
getBooleanOption, getOption, getRealOption, processOption, setOption, setOption, setOption, setTrain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

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.
Method Detail

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.