public class CoverageDefinition extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CoverageDefinition.CoverageStatistics |
| Constructor and Description |
|---|
CoverageDefinition(FeatureDefinition featDef,
CoverageFeatureProvider cfProvider,
String configFile)
Build a new coverage definition and read in the config file
|
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getAllPhones() |
CoverageDefinition.CoverageStatistics |
getCorpusStatistics()
Get descriptive statistics for the full corpus.
|
CoverageFeatureProvider |
getCoverageFeatureProvider() |
Set<String> |
getDiphonesInCorpus() |
Set<String> |
getPhonesInCorpus() |
byte |
getVectorValue(byte[] vectors,
int vectorIndex,
int valueIndex) |
void |
initialiseCoverage()
Compute the coverage of the corpus, build and fill the cover sets.
|
void |
printResultToLog(PrintWriter logOut) |
void |
printSelectionDistribution(String distributionFile,
String developmentFile,
boolean logDevelopment)
Print statistics of the selected sentences and a table of coverage development over time
|
void |
printSettings(PrintWriter out)
Print the settings of the config file
|
void |
printTextCorpusStatistics(PrintWriter out)
Print a statistic of the unit distribution in the corpus
|
boolean |
reachedMaxSimpleDiphones()
Check if cover has maximum simple diphone coverage
|
boolean |
reachedMaxSimpleProsody()
Check if cover has maximum simple prosody coverage
|
void |
readCoverageBin(String filename,
int[] idSentenceList)
Read the cover sets from the given file
|
void |
updateCover(byte[] features)
Add the feature vectors for one sentence to the cover
|
double |
usefulnessOfFVs(byte[] featureVectors)
Get the usefulness of the given feature vectors Usefulness of a feature vector is defined as the sum of the score for the
feature vectors on all levels of the tree.
|
void |
writeCoverageBin(String filename)
Print the cover sets to the given file
|
public CoverageDefinition(FeatureDefinition featDef, CoverageFeatureProvider cfProvider, String configFile) throws Exception
featDef - the feature definition for the vectorscfProvider - coverage feature providerconfigFile - optionally, the coverage config file name. if this is null, default settings will be used.Exception - Exceptionpublic void initialiseCoverage()
throws IOException
IOException - IOExceptionpublic CoverageDefinition.CoverageStatistics getCorpusStatistics()
public void printTextCorpusStatistics(PrintWriter out) throws Exception
out - the print writer to print toException - Exceptionpublic void printSettings(PrintWriter out)
out - the PrintWriter to print topublic void printSelectionDistribution(String distributionFile, String developmentFile, boolean logDevelopment) throws Exception
distributionFile - the file to print the statistics todevelopmentFile - the file to print the coverage development tologDevelopment - if true, print development fileException - Exceptionpublic void printResultToLog(PrintWriter logOut)
public void updateCover(byte[] features)
features - the feature vectors to addpublic boolean reachedMaxSimpleDiphones()
public boolean reachedMaxSimpleProsody()
public double usefulnessOfFVs(byte[] featureVectors)
featureVectors - the feature vectorspublic CoverageFeatureProvider getCoverageFeatureProvider()
public byte getVectorValue(byte[] vectors,
int vectorIndex,
int valueIndex)
public void writeCoverageBin(String filename) throws Exception
filename - the file to print toException - ExceptionCopyright © 2000–2016 DFKI GmbH. All rights reserved.