FST  openfst-1.8.3
OpenFst Library
phi-fst.cc
Go to the documentation of this file.
1 // Copyright 2005-2024 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the 'License');
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an 'AS IS' BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 // See www.openfst.org for extensive documentation on this weighted
16 // finite-state transducer library.
17 
19 
20 #include <fst/flags.h>
21 #include <fst/arc.h>
22 #include <fst/register.h>
23 
24 DEFINE_int64(phi_fst_phi_label, 0,
25  "Label of transitions to be interpreted as phi ('failure') "
26  "transitions");
27 DEFINE_bool(phi_fst_phi_loop, true,
28  "When true, a phi self loop consumes a symbol");
29 DEFINE_string(phi_fst_rewrite_mode, "auto",
30  "Rewrite both sides when matching? One of:"
31  " \"auto\" (rewrite iff acceptor), \"always\", \"never\"");
32 
33 namespace fst {
34 
38 
42 
46 
47 } // namespace fst
MatcherFst< ConstFst< Arc >, PhiFstMatcher< SortedMatcher< ConstFst< Arc >>, kPhiFstMatchInput >, input_phi_fst_type > InputPhiFst
Definition: phi-fst.h:176
ArcTpl< TropicalWeight > StdArc
Definition: arc.h:75
ArcTpl< Log64Weight > Log64Arc
Definition: arc.h:77
DEFINE_string(phi_fst_rewrite_mode,"auto","Rewrite both sides when matching? One of:"" \"auto\" (rewrite iff acceptor), \"always\", \"never\"")
MatcherFst< ConstFst< Arc >, PhiFstMatcher< SortedMatcher< ConstFst< Arc >>>, phi_fst_type > PhiFst
Definition: phi-fst.h:168
DEFINE_int64(phi_fst_phi_label, 0,"Label of transitions to be interpreted as phi ('failure') ""transitions")
MatcherFst< ConstFst< Arc >, PhiFstMatcher< SortedMatcher< ConstFst< Arc >>, kPhiFstMatchOutput >, output_phi_fst_type > OutputPhiFst
Definition: phi-fst.h:184
DEFINE_bool(phi_fst_phi_loop, true,"When true, a phi self loop consumes a symbol")
REGISTER_FST(PhiFst, StdArc)
ArcTpl< LogWeight > LogArc
Definition: arc.h:76