push-lattice.h
Go to the documentation of this file.
1 // lat/push-lattice.h
2 
3 // Copyright 2013 Johns Hopkins University (Author: Daniel Povey)
4 // 2014 Guoguo Chen
5 
6 // See ../../COPYING for clarification regarding multiple authors
7 //
8 // Licensed under the Apache License, Version 2.0 (the "License");
9 // you may not use this file except in compliance with the License.
10 // You may obtain a copy of the License at
11 //
12 // http://www.apache.org/licenses/LICENSE-2.0
13 //
14 // THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 // KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
16 // WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
17 // MERCHANTABLITY OR NON-INFRINGEMENT.
18 // See the Apache 2 License for the specific language governing permissions and
19 // limitations under the License.
20 
21 
22 #ifndef KALDI_LAT_PUSH_LATTICE_H_
23 #define KALDI_LAT_PUSH_LATTICE_H_
24 
25 #include <vector>
26 #include <map>
27 
28 #include "base/kaldi-common.h"
29 #include "util/common-utils.h"
30 #include "fstext/fstext-lib.h"
31 #include "lat/kaldi-lattice.h"
32 
33 namespace fst {
34 
35 
45 template<class Weight, class IntType>
47  MutableFst<ArcTpl<CompactLatticeWeightTpl<Weight, IntType> > > *clat);
48 
55 template<class Weight, class IntType>
57  MutableFst<ArcTpl<CompactLatticeWeightTpl<Weight, IntType> > > *clat);
58 
59 } // namespace fst
60 
61 #endif // KALDI_LAT_PUSH_LATTICE_H_
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
Definition: graph.dox:21
bool PushCompactLatticeStrings(MutableFst< ArcTpl< CompactLatticeWeightTpl< Weight, IntType > > > *clat)
This function pushes the transition-ids as far towards the start as they will go. ...
bool PushCompactLatticeWeights(MutableFst< ArcTpl< CompactLatticeWeightTpl< Weight, IntType > > > *clat)
This function pushes the weights in the CompactLattice so that all states except possibly the start s...