25 const std::vector<int32> &list) {
28 if (!ko.
Open(wxfilename,
false,
false))
return false;
29 for (
size_t i = 0;
i < list.size();
i++) ko.
Stream() << list[
i] <<
'\n';
34 std::vector<int32> *list) {
37 std::istream &is = ki.
Stream();
40 while ( !(is >> i).fail() )
47 const std::vector<std::vector<int32> > &list) {
50 if (!ko.
Open(wxfilename,
false,
false))
return false;
51 std::ostream &os = ko.
Stream();
52 for (
size_t i = 0;
i < list.size();
i++) {
53 for (
size_t j = 0;
j < list[
i].size();
j++) {
55 if (
j+1 < list[
i].size()) os <<
' ';
63 std::vector<std::vector<int32> > *list) {
66 std::istream &is = ki.
Stream();
69 while (std::getline(is, line)) {
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
bool SplitStringToIntegers(const std::string &full, const char *delim, bool omit_empty_strings, std::vector< I > *out)
Split a string (e.g.
bool ReadIntegerVectorVectorSimple(const std::string &rxfilename, std::vector< std::vector< int32 > > *list)
bool Open(const std::string &wxfilename, bool binary, bool write_header)
This opens the stream, with the given mode (binary or text).
bool WriteIntegerVectorVectorSimple(const std::string &wxfilename, const std::vector< std::vector< int32 > > &list)
bool WriteIntegerVectorSimple(const std::string &wxfilename, const std::vector< int32 > &list)
WriteToList attempts to write this list of integers, one per line, to the given file, in text format.
bool ReadIntegerVectorSimple(const std::string &rxfilename, std::vector< int32 > *list)
ReadFromList attempts to read this list of integers, one per line, from the given file...