de.fu_berlin.ties.extract.amend
Class BeginEndReextractor

java.lang.Object
  extended by de.fu_berlin.ties.extract.amend.BeginEndReextractor
All Implemented Interfaces:
FinalReextractor

public class BeginEndReextractor
extends Object
implements FinalReextractor

A second level for the BeginEndStrategy, similar to the ELIE/2 system by Finn and Kushmerick.

Version:
$Revision: 1.19 $, $Date: 2006/10/21 16:04:15 $, $Author: siefkes $
Author:
Christian Siefkes

Nested Class Summary
static class BeginEndReextractor.PositivePredictionsMap
          An inner class used for communication with the first level (BeginEndStrategy).
 
Field Summary
static String CONTEXT_BEGIN_MAP
          Context key for the map from token indices to positive predictions of the begin classifier.
static String CONTEXT_END_MAP
          Context key for the map from token indices to positive predictions of the end classifier.
static String SUFFIX_AMEND
          Optional suffix that can be appended to the Classifier.CONFIG_CLASSIFIER configuration key to modify the type of classifiers used by this instance.
 
Constructor Summary
BeginEndReextractor(Set<String> classNames, TiesConfiguration config, LengthFilter myLengthFilter)
          Creates a new instance.
 
Method Summary
 ExtractionContainer reextract(ExtractionContainer originalExtractions, List<ContextDetails> contextDetails, ContextMap context)
          Re-extract all extractions in a document at the end of the document, considering the complete states of all tokens.
 String toString()
          Returns a string representation of this object.
 void train(ExtractionContainer answerKeys, List<ContextDetails> contextDetails, ContextMap context)
          Trains the re-extractor on a document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTEXT_BEGIN_MAP

public static final String CONTEXT_BEGIN_MAP
Context key for the map from token indices to positive predictions of the begin classifier.

See Also:
Constant Field Values

CONTEXT_END_MAP

public static final String CONTEXT_END_MAP
Context key for the map from token indices to positive predictions of the end classifier.

See Also:
Constant Field Values

SUFFIX_AMEND

public static final String SUFFIX_AMEND
Optional suffix that can be appended to the Classifier.CONFIG_CLASSIFIER configuration key to modify the type of classifiers used by this instance.

See Also:
Constant Field Values
Constructor Detail

BeginEndReextractor

public BeginEndReextractor(Set<String> classNames,
                           TiesConfiguration config,
                           LengthFilter myLengthFilter)
                    throws ProcessingException
Creates a new instance.

Parameters:
classNames - a set of valid class names (String)
config - used to configure this instance
myLengthFilter - used to determine the maximum tolerated length of extractions
Throws:
ProcessingException - if an error occurs during initialization of the used classifeirs
Method Detail

reextract

public ExtractionContainer reextract(ExtractionContainer originalExtractions,
                                     List<ContextDetails> contextDetails,
                                     ContextMap context)
                              throws ProcessingException
Re-extract all extractions in a document at the end of the document, considering the complete states of all tokens.

Specified by:
reextract in interface FinalReextractor
Parameters:
originalExtractions - the original extractions predicted for this document
contextDetails - a list of context details representing all tokens in the document
context - a map of context object provided by the combination strategy
Returns:
the predicted extractions
Throws:
ProcessingException - if an error occurs during processing

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a textual representation

train

public void train(ExtractionContainer answerKeys,
                  List<ContextDetails> contextDetails,
                  ContextMap context)
           throws ProcessingException
Trains the re-extractor on a document.

Specified by:
train in interface FinalReextractor
Parameters:
answerKeys - the true extractions to train for this document
contextDetails - a list of context details representing all tokens in the document
context - a map of context object provided by the combination strategy
Throws:
ProcessingException - if an error occurs during processing


Copyright © 2003-2007 Christian Siefkes. All Rights Reserved.