push-special.h
Go to the documentation of this file.
1 // fstext/push-special.h
2 
3 // Copyright 2012-2015 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 #ifndef KALDI_FSTEXT_PUSH_SPECIAL_H_
21 #define KALDI_FSTEXT_PUSH_SPECIAL_H_
22 
23 #include <fst/fstlib.h>
24 #include <fst/fst-decl.h>
25 #include "util/const-integer-set.h"
26 
27 namespace fst {
28 
29 /*
30  This function does weight-pushing, in the log semiring,
31  but in a special way, such that any "leftover weight" after pushing
32  gets distributed evenly along the FST, and doesn't end up either
33  at the start or at the end. Basically it pushes the weights such
34  that the total weight of each state (i.e. the sum of the arc
35  probabilities plus the final-prob) is the same for all states.
36 */
37 void PushSpecial(VectorFst<StdArc> *fst,
38  float delta = kDelta);
39 
40 }
41 
42 #endif
For an extended explanation of the framework of which grammar-fsts are a part, please see Support for...
Definition: graph.dox:21
void PushSpecial(VectorFst< StdArc > *fst, float delta)