confidence.h
Go to the documentation of this file.
1 // lat/confidence.h
2 
3 // Copyright 2013 Johns Hopkins University (Author: Daniel Povey)
4 
5 // See ../../COPYING for clarification regarding multiple authors
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16 // MERCHANTABLITY OR NON-INFRINGEMENT.
17 // See the Apache 2 License for the specific language governing permissions and
18 // limitations under the License.
19 
20 
21 #ifndef KALDI_LAT_CONFIDENCE_H_
22 #define KALDI_LAT_CONFIDENCE_H_
23 
24 #include <vector>
25 #include <map>
26 
27 #include "base/kaldi-common.h"
28 #include "util/common-utils.h"
29 #include "fstext/fstext-lib.h"
30 #include "lat/kaldi-lattice.h"
31 
32 namespace kaldi {
33 
58  int32 *num_paths,
59  std::vector<int32> *best_sentence,
60  std::vector<int32> *second_best_sentence);
61 
62 
67  int32 *num_paths,
68  std::vector<int32> *best_sentence,
69  std::vector<int32> *second_best_sentence);
70 
71 
72 
73 
74 
75 } // namespace kaldi
76 
77 #endif // KALDI_LAT_CONFIDENCE_H_
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
Definition: chain.dox:20
BaseFloat SentenceLevelConfidence(const CompactLattice &clat, int32 *num_paths, std::vector< int32 > *best_sentence, std::vector< int32 > *second_best_sentence)
Caution: this function is not the only way to get confidences in Kaldi.
Definition: confidence.cc:26
kaldi::int32 int32
float BaseFloat
Definition: kaldi-types.h:29
fst::VectorFst< LatticeArc > Lattice
Definition: kaldi-lattice.h:44
fst::VectorFst< CompactLatticeArc > CompactLattice
Definition: kaldi-lattice.h:46