28 std::vector<std::string> lines;
30 std::string str =
"(,test )";
32 KALDI_ASSERT(lines[0] ==
"(" && lines[1] ==
"," && lines[2] ==
"test" && lines[3] ==
")");
39 KALDI_ASSERT(lines.size() == 5 && lines[0] ==
"t" && lines[3] ==
"-1");
43 KALDI_ASSERT(lines.size() == 4 && lines[0] ==
"sd" && lines[2] ==
"-112");
47 KALDI_ASSERT(lines.size() == 4 && lines[0] ==
"sd" && lines[2] ==
"+112");
94 using namespace kaldi;
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
bool DescriptorTokenize(const std::string &input, std::vector< std::string > *tokens)
This function tokenizes input when parsing Descriptor configuration values.
std::string SummarizeVector(const VectorBase< float > &vec)
Returns a string that summarizes a vector fairly succintly, for printing stats in info lines...
void Resize(MatrixIndexT length, MatrixResizeType resize_type=kSetZero)
Set vector to a specified size (can be zero).
bool NameMatchesPattern(const char *name, const char *pattern)
void UnitTestNameMatchesPattern()
void UnitTestSummarizeVector()
void SetRandn()
Set vector to random normally-distributed noise.
A class representing a vector.
#define KALDI_ASSERT(cond)
void UnitTestDescriptorTokenize()