FST  openfst-1.8.3
OpenFst Library
fstequivalent.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 #include <cstdint>
16 #include <limits>
17 
18 #include <fst/flags.h>
19 #include <fst/weight.h>
20 #include <fst/script/getters.h>
21 
22 DEFINE_double(delta, ::fst::kDelta, "Comparison/quantization delta");
23 DEFINE_bool(random, false,
24  "Test equivalence by randomly selecting paths in the input FSTs");
25 DEFINE_int32(max_length, std::numeric_limits<int32_t>::max(),
26  "Maximum path length");
27 DEFINE_int32(npath, 1, "Number of paths to generate");
28 DEFINE_uint64(seed, ::fst::script::kDefaultSeed, "Random seed");
29 DEFINE_string(select, "uniform",
30  "Selection type: one of "
31  " \"uniform\", \"log_prob\" (when appropriate),"
32  " \"fast_log_prob\" (when appropriate)");
33 
34 int fstequivalent_main(int argc, char **argv);
35 
36 int main(int argc, char **argv) { return fstequivalent_main(argc, argv); }
constexpr uint64_t kDefaultSeed
Definition: getters.h:49
DEFINE_uint64(seed,::fst::script::kDefaultSeed,"Random seed")
DEFINE_int32(max_length, std::numeric_limits< int32_t >::max(),"Maximum path length")
int fstequivalent_main(int argc, char **argv)
DEFINE_double(delta,::fst::kDelta,"Comparison/quantization delta")
DEFINE_string(select,"uniform","Selection type: one of "" \"uniform\", \"log_prob\" (when appropriate),"" \"fast_log_prob\" (when appropriate)")
int main(int argc, char **argv)
constexpr float kDelta
Definition: weight.h:133
DEFINE_bool(random, false,"Test equivalence by randomly selecting paths in the input FSTs")