|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.extract.reestimate.Reestimator
public abstract class Reestimator
A re-estimator recalculates the probabilites of extractions in a suitable way. Re-estimators can be chained -- in this case each estimator will work on the extractions returned by the previous one.
Field Summary | |
---|---|
static String |
CONFIG_REESTIMATORS
Configuration key specifying the list of re-estimators to chain. |
Constructor Summary | |
---|---|
Reestimator(Reestimator precReestimator,
TiesConfiguration config)
Creates a new instance. |
Method Summary | |
---|---|
static Reestimator |
createReestimators()
Factory method that delegates to createReestimators() using
the standard configuration. |
static Reestimator |
createReestimators(TiesConfiguration config)
Factory method that creates a re-estimator chain based on the CONFIG_REESTIMATORS key in the provided configuration. |
protected abstract Extraction |
doReestimate(Extraction extraction)
Re-estimates the probability of an extraction. |
protected abstract void |
doTrain(Extraction extraction)
Trains this re-estimator on an extraction. |
Reestimator |
getPrecedingReestimator()
Returns the preceding re-estimator used if this re-estimator is part of a chain. |
Extraction |
reestimate(Extraction extraction)
Re-estimates the probability of an extraction. |
String |
toString()
Returns a string representation of this object. |
void |
train(Extraction extraction)
Trains this re-estimator on an extraction. |
void |
trainOtherToken(ContextDetails tokenDetails)
Trains this re-estimator on a token that is notpart of any extraction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String CONFIG_REESTIMATORS
Constructor Detail |
---|
public Reestimator(Reestimator precReestimator, TiesConfiguration config)
precReestimator
- the preceding re-estimator to use if this
re-estimator is part of a chain; null
otherwiseconfig
- the configuration to useMethod Detail |
---|
public static Reestimator createReestimators() throws IllegalArgumentException, ProcessingException
createReestimators()
using
the standard configuration.
null
is no estimators are specified (parameter value is
null
or empty)
IllegalArgumentException
- if the value of the
CONFIG_REESTIMATORS
key is invalid
ProcessingException
- if an error occurred while creating the
re-estimatorpublic static Reestimator createReestimators(TiesConfiguration config) throws IllegalArgumentException, ProcessingException
CONFIG_REESTIMATORS
key in the provided configuration.
This parameter must contain a list fully specified names of subclasses
of this class) used in a chain.
Eeach specified re-estimator must provide a constructor accepting a
preceding Reestimator
as first argument and a
TiesConfiguration
as second argument.
config
- the configuration to use
null
is no re-estimator are specified (parameter value is
null
or empty)
IllegalArgumentException
- if the value of the
CONFIG_REESTIMATORS
key is invalid
ProcessingException
- if an error occurred while creating the
re-estimatorprotected abstract Extraction doReestimate(Extraction extraction)
extraction
- the extraction to re-estimate
null
if the
extraction should be deletedprotected abstract void doTrain(Extraction extraction)
extraction
- the extraction to trainpublic Reestimator getPrecedingReestimator()
null
if this
re-estimator is not part of a chain resp. is the first re-estimator in a
chainpublic String toString()
toString
in class Object
public Extraction reestimate(Extraction extraction)
doReestimate(de.fu_berlin.ties.extract.Extraction)
method.
extraction
- the extraction to re-estimate
null
if the
extraction should be deletedpublic void train(Extraction extraction)
doTrain(de.fu_berlin.ties.extract.Extraction)
method.
extraction
- the extraction to trainpublic void trainOtherToken(ContextDetails tokenDetails)
tokenDetails
- a ContextDetails
containing all
relevant information on the token and its context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |