#include <kws-scoring.h>
|
void | WriteCsv (std::iostream &os, const float frames_per_sec) |
|
AlignedTerms::const_iterator | begin () const |
|
AlignedTerms::const_iterator | end () const |
|
int | size () const |
|
Definition at line 97 of file kws-scoring.h.
◆ AlignedTerms
◆ Add()
◆ begin()
AlignedTerms::const_iterator begin |
( |
| ) |
const |
|
inline |
◆ end()
AlignedTerms::const_iterator end |
( |
| ) |
const |
|
inline |
◆ size()
◆ WriteCsv()
void WriteCsv |
( |
std::iostream & |
os, |
|
|
const float |
frames_per_sec |
|
) |
| |
Definition at line 244 of file kws-scoring.cc.
Referenced by main().
245 AlignedTerms::const_iterator it =
begin();
246 os <<
"language,file,channel,termid,term,ref_bt,ref_et," 247 <<
"sys_bt,sys_et,sys_score,sys_decision,alignment\n";
249 while ( it !=
end() ) {
250 int file = it->ref.valid() ? it->ref.utt_id() : it->hyp.utt_id();
251 std::string termid = it->ref.valid() ? it->ref.kw_id() : it->hyp.kw_id();
252 std::string term = termid;
253 std::string lang =
"";
262 if (it->ref.valid()) {
263 os << it->ref.start_time() /
static_cast<float>(frames_per_sec) <<
"," 264 << it->ref.end_time() /
static_cast<float>(frames_per_sec) <<
",";
268 if (it->hyp.valid()) {
269 os << it->hyp.start_time() /
static_cast<float>(frames_per_sec) <<
"," 270 << it->hyp.end_time() /
static_cast<float>(frames_per_sec) <<
"," 271 << it->hyp.score() <<
"," 272 << (it->hyp.score() >= 0.5 ?
"YES" :
"NO") <<
",";
274 os <<
"," <<
"," <<
"," <<
",";
277 if (it->ref.valid() && it->hyp.valid()) {
278 os << (it->hyp.score() >= 0.5 ?
"CORR" :
"MISS");
279 }
else if (it->ref.valid()) {
281 }
else if (it->hyp.valid()) {
282 os << (it->hyp.score() >= 0.5 ?
"FA" :
"CORR!DET");
AlignedTerms::const_iterator begin() const
AlignedTerms::const_iterator end() const
◆ KwsTermsAligner
◆ alignment_
The documentation for this class was generated from the following files: