public class StatisticalModelCost extends Object implements StatisticalCostFunction
Modifier and Type | Field and Description |
---|---|
protected SCostFileReader |
sCostReader |
protected float |
sCostWeight |
Constructor and Description |
---|
StatisticalModelCost()
Empty constructor; when using this, call init() separately to initialise this class.
|
Modifier and Type | Method and Description |
---|---|
double |
cost(Unit u1,
Unit u2) |
double |
cost(Unit u1,
Unit u2,
boolean consecutive)
Cost function for a given units if consecutive == true, and if they are consecutive units make cost = 0
|
int |
getNumberOfUnits()
Get the number of units.
|
void |
init(String configPrefix)
Initialise this scost function by reading the appropriate settings from the MaryProperties using the given configPrefix.
|
protected SCostFileReader sCostReader
protected float sCostWeight
public StatisticalModelCost()
init(String)
public void init(String configPrefix) throws MaryConfigurationException
init
in interface StatisticalCostFunction
configPrefix
- the prefix for the (voice-specific) config entries to use when looking up files to load.MaryConfigurationException
- MaryConfigurationExceptionpublic int getNumberOfUnits()
public double cost(Unit u1, Unit u2)
cost
in interface StatisticalCostFunction
Copyright © 2000–2016 DFKI GmbH. All rights reserved.