20 #ifndef KALDI_NNET3_NNET_COMPILE_UTILS_H_ 21 #define KALDI_NNET3_NNET_COMPILE_UTILS_H_ 82 const std::vector<std::vector<std::pair<int32, int32> > > &submat_lists,
83 std::vector<std::vector<std::pair<int32, int32> > > *split_lists);
112 const std::vector<std::vector<std::pair<int32, int32> > > &submat_lists,
113 std::vector<std::vector<std::pair<int32, int32> > > *split_lists);
121 const std::vector<std::pair<int32, int32> > &location_vector,
123 std::vector<int32> *second_values);
135 std::vector<std::pair<int32, int32> > *reverse_indexes);
150 const std::vector<int32> &indexes,
151 std::vector<std::vector<int32> > *indexes_out);
159 void GetTList(
const std::vector<Index> &indexes,
160 std::vector<int32> *t_values);
169 void GetTList(
const std::vector<Index> &indexes,
170 std::vector<int32> *t_values);
176 void GetNxList(
const std::vector<Index> &indexes,
177 std::vector<std::pair<int32, int32> > *pairs);
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void GetTList(const std::vector< Index > &indexes, std::vector< int32 > *t_values)
This function outputs a sorted, unique list of the 't' values that are encountered in the provided li...
bool HasContiguousProperty(const std::vector< int32 > &indexes, std::vector< std::pair< int32, int32 > > *reverse_indexes)
This function returns true if for each integer i != -1, all the indexes j at which indexes[j] == i ar...
bool ConvertToIndexes(const std::vector< std::pair< int32, int32 > > &location_vector, int32 *first_value, std::vector< int32 > *second_values)
If it is the case for some i >= 0 that all the .first elements of "location_vector" are either i or -...
The two main classes defined in this header are struct ComputationRequest, which basically defines a ...
void SplitLocations(const std::vector< std::vector< std::pair< int32, int32 > > > &submat_lists, std::vector< std::vector< std::pair< int32, int32 > > > *split_lists)
The input to this function is a vector (indexed by matrix-row-index) of lists of pairs (submat_index...
void EnsureContiguousProperty(const std::vector< int32 > &indexes, std::vector< std::vector< int32 > > *indexes_out)
This function takes a vector of indexes and splits it up into as separate vectors of the same size...
void SplitLocationsBackward(const std::vector< std::vector< std::pair< int32, int32 > > > &submat_lists, std::vector< std::vector< std::pair< int32, int32 > > > *split_lists)
This function has the same interface as SplitLocations(); however, it ensures certain additional prop...
void GetNxList(const std::vector< Index > &indexes, std::vector< std::pair< int32, int32 > > *pairs)
This function outputs a unique, lexicographically sorted list of the pairs of (n, x) values that are ...