word-align-lattice-lexicon.cc File Reference
Include dependency graph for word-align-lattice-lexicon.cc:

Go to the source code of this file.


class  LatticeLexiconWordAligner
class  LatticeLexiconWordAligner::ComputationState
struct  LatticeLexiconWordAligner::Tuple
struct  LatticeLexiconWordAligner::TupleHash
struct  LatticeLexiconWordAligner::TupleEqual


 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:


static bool IsPlausibleWord (const WordAlignLatticeLexiconInfo &lexicon_info, const TransitionModel &tmodel, int32 word_id, const std::vector< int32 > &transition_ids)
static void MapSymbols (const WordAlignLatticeLexiconInfo &lexicon_info, CompactLattice *lat)
 Testing code; map word symbols in the lattice "lat" using the equivalence-classes obtained from the lexicon, using the function EquivalenceClassOf in the lexicon_info object. More...
static bool TestWordAlignedLattice (const WordAlignLatticeLexiconInfo &lexicon_info, const TransitionModel &tmodel, CompactLattice clat, CompactLattice aligned_clat, bool allow_duplicate_paths)
bool WordAlignLatticeLexicon (const CompactLattice &lat, const TransitionModel &tmodel, const WordAlignLatticeLexiconInfo &lexicon_info, const WordAlignLatticeLexiconOpts &opts, CompactLattice *lat_out)
 Align lattice so that each arc has the transition-ids on it that correspond to the word that is on that arc. More...
bool ReadLexiconForWordAlign (std::istream &is, std::vector< std::vector< int32 > > *lexicon)
 Read the lexicon in the special format required for word alignment. More...


const int kTemporaryEpsilon = -2
const int kNumStatesOffset = 1000