public interface TargetCostFunction
| Modifier and Type | Method and Description |
|---|---|
void |
computeTargetFeatures(Target target)
Compute the features for a given target, and store them in the target.
|
double |
cost(Target target,
Unit unit)
Compute the goodness-of-fit of a given unit for a given target.
|
String |
getFeature(Unit unit,
String featureName)
Get the string representation of the feature value associated with the given unit
|
FeatureDefinition |
getFeatureDefinition()
Provide access to the Feature Definition used.
|
FeatureVector |
getFeatureVector(Unit unit)
Get the target cost feature vector for the given unit.
|
FeatureVector[] |
getFeatureVectors()
Get all feature vectors.
|
void |
load(FeatureFileReader featureFileReader,
InputStream weightsStream,
FeatureProcessorManager featProc)
Initialise the data needed to do a target cost computation.
|
void |
load(String featureFileName,
InputStream weightsStream,
FeatureProcessorManager featProc)
Initialise the data needed to do a target cost computation.
|
void load(String featureFileName, InputStream weightsStream, FeatureProcessorManager featProc) throws IOException, MaryConfigurationException
featureFileName - name of a file containing the unit featuresweightsStream - an optional weights file -- if non-null, contains feature weights that override the ones present in the feature
file.featProc - a feature processor manager which can provide feature processors to compute the features for a target at run
timeIOException - IOExceptionMaryConfigurationException - if a configuration problem is detected while loading the datavoid load(FeatureFileReader featureFileReader, InputStream weightsStream, FeatureProcessorManager featProc) throws IOException
featureFileReader - a reader for the file containing the unit featuresweightsStream - an optional weights file -- if non-null, contains feature weights that override the ones present in the feature
file.featProc - a feature processor manager which can provide feature processors to compute the features for a target at run
timeIOException - IOExceptiondouble cost(Target target, Unit unit)
target - targetunit - unitvoid computeTargetFeatures(Target target)
target - the target for which to compute the featuresTarget.getFeatureVector()FeatureDefinition getFeatureDefinition()
String getFeature(Unit unit, String featureName)
unit - the unit whose feature value is requestedfeatureName - name of the feature requestedIllegalArgumentException - if featureName is not a known featureFeatureVector getFeatureVector(Unit unit)
unit - unitFeatureVector[] getFeatureVectors()
Copyright © 2000–2016 DFKI GmbH. All rights reserved.