Skip to content

Commit 28d28b0

Browse files
committed
Cosmetic variable name change: OptionsItf po -> OptionsItf opts
1 parent 5c01929 commit 28d28b0

File tree

79 files changed

+1312
-1312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1312
-1312
lines changed

src/decoder/decoder-wrappers.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ struct AlignConfig {
3838

3939
AlignConfig(): beam(200.0), retry_beam(0.0), careful(false) { }
4040

41-
void Register(OptionsItf *po) {
42-
po->Register("beam", &beam, "Decoding beam used in alignment");
43-
po->Register("retry-beam", &retry_beam,
44-
"Decoding beam for second try at alignment");
45-
po->Register("careful", &careful,
46-
"If true, do 'careful' alignment, which is better at detecting "
47-
"alignment failure (involves loop to start of decoding graph).");
41+
void Register(OptionsItf *opts) {
42+
opts->Register("beam", &beam, "Decoding beam used in alignment");
43+
opts->Register("retry-beam", &retry_beam,
44+
"Decoding beam for second try at alignment");
45+
opts->Register("careful", &careful,
46+
"If true, do 'careful' alignment, which is better at detecting "
47+
"alignment failure (involves loop to start of decoding graph).");
4848
}
4949
};
5050

src/decoder/faster-decoder.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ struct FasterDecoderOptions {
4242
// alignment, use small default.
4343
beam_delta(0.5),
4444
hash_ratio(2.0) { }
45-
void Register(OptionsItf *po, bool full) { /// if "full", use obscure
45+
void Register(OptionsItf *opts, bool full) { /// if "full", use obscure
4646
/// options too.
4747
/// Depends on program.
48-
po->Register("beam", &beam, "Decoder beam");
49-
po->Register("max-active", &max_active, "Decoder max active states.");
50-
po->Register("min-active", &min_active,
51-
"Decoder min active states (don't prune if #active less than this).");
48+
opts->Register("beam", &beam, "Decoder beam");
49+
opts->Register("max-active", &max_active, "Decoder max active states.");
50+
opts->Register("min-active", &min_active,
51+
"Decoder min active states (don't prune if #active less than this).");
5252
if (full) {
53-
po->Register("beam-delta", &beam_delta,
54-
"Increment used in decoder [obscure setting]");
55-
po->Register("hash-ratio", &hash_ratio,
56-
"Setting used in decoder to control hash behavior");
53+
opts->Register("beam-delta", &beam_delta,
54+
"Increment used in decoder [obscure setting]");
55+
opts->Register("hash-ratio", &hash_ratio,
56+
"Setting used in decoder to control hash behavior");
5757
}
5858
}
5959
};

src/decoder/lattice-faster-decoder.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,22 +64,22 @@ struct LatticeFasterDecoderConfig {
6464
beam_delta(0.5),
6565
hash_ratio(2.0),
6666
prune_scale(0.1) { }
67-
void Register(OptionsItf *po) {
68-
det_opts.Register(po);
69-
po->Register("beam", &beam, "Decoding beam.");
70-
po->Register("max-active", &max_active, "Decoder max active states.");
71-
po->Register("min-active", &min_active, "Decoder minimum #active states.");
72-
po->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
73-
po->Register("prune-interval", &prune_interval, "Interval (in frames) at "
74-
"which to prune tokens");
75-
po->Register("determinize-lattice", &determinize_lattice, "If true, "
76-
"determinize the lattice (in a special sense, keeping only "
77-
"best pdf-sequence for each word-sequence).");
78-
po->Register("beam-delta", &beam_delta, "Increment used in decoding-- this "
79-
"parameter is obscure and relates to a speedup in the way the "
80-
"max-active constraint is applied. Larger is more accurate.");
81-
po->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
82-
" hash behavior");
67+
void Register(OptionsItf *opts) {
68+
det_opts.Register(opts);
69+
opts->Register("beam", &beam, "Decoding beam.");
70+
opts->Register("max-active", &max_active, "Decoder max active states.");
71+
opts->Register("min-active", &min_active, "Decoder minimum #active states.");
72+
opts->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
73+
opts->Register("prune-interval", &prune_interval, "Interval (in frames) at "
74+
"which to prune tokens");
75+
opts->Register("determinize-lattice", &determinize_lattice, "If true, "
76+
"determinize the lattice (in a special sense, keeping only "
77+
"best pdf-sequence for each word-sequence).");
78+
opts->Register("beam-delta", &beam_delta, "Increment used in decoding-- this "
79+
"parameter is obscure and relates to a speedup in the way the "
80+
"max-active constraint is applied. Larger is more accurate.");
81+
opts->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
82+
" hash behavior");
8383
}
8484
void Check() const {
8585
KALDI_ASSERT(beam > 0.0 && max_active > 1 && lattice_beam > 0.0

src/decoder/lattice-simple-decoder.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ struct LatticeSimpleDecoderConfig {
5353
determinize_lattice(true),
5454
beam_ratio(0.9),
5555
prune_scale(0.1) { }
56-
void Register(OptionsItf *po) {
57-
det_opts.Register(po);
58-
po->Register("beam", &beam, "Decoding beam.");
59-
po->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
60-
po->Register("prune-interval", &prune_interval, "Interval (in frames) at "
61-
"which to prune tokens");
62-
po->Register("determinize-lattice", &determinize_lattice, "If true, "
63-
"determinize the lattice (in a special sense, keeping only "
64-
"best pdf-sequence for each word-sequence).");
56+
void Register(OptionsItf *opts) {
57+
det_opts.Register(opts);
58+
opts->Register("beam", &beam, "Decoding beam.");
59+
opts->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
60+
opts->Register("prune-interval", &prune_interval, "Interval (in frames) at "
61+
"which to prune tokens");
62+
opts->Register("determinize-lattice", &determinize_lattice, "If true, "
63+
"determinize the lattice (in a special sense, keeping only "
64+
"best pdf-sequence for each word-sequence).");
6565
}
6666
void Check() const {
6767
KALDI_ASSERT(beam > 0.0 && lattice_beam > 0.0 && prune_interval > 0);

src/decoder/lattice-tracking-decoder.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ struct LatticeTrackingDecoderConfig {
5454
hash_ratio(2.0),
5555
extra_beam(4.0),
5656
max_beam(40.0) { }
57-
void Register(OptionsItf *po) {
58-
det_opts.Register(po);
59-
po->Register("beam", &beam, "Decoding beam.");
60-
po->Register("max-active", &max_active, "Decoder max active states.");
61-
po->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
62-
po->Register("prune-interval", &prune_interval, "Interval (in frames) at "
63-
"which to prune tokens");
64-
po->Register("determinize-lattice", &determinize_lattice, "If true, "
65-
"determinize the lattice (in a special sense, keeping only "
66-
"best pdf-sequence for each word-sequence).");
67-
po->Register("beam-delta", &beam_delta, "Increment used in decoding");
68-
po->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
69-
" hash behavior");
70-
po->Register("extra-beam", &extra_beam, "Increment used in decoding (added "
71-
"to worst tracked token from first pass)");
72-
po->Register("max-beam", &max_beam, "Maximum beam (in case tracked tokens "
73-
"go too far from beam)");
57+
void Register(OptionsItf *opts) {
58+
det_opts.Register(opts);
59+
opts->Register("beam", &beam, "Decoding beam.");
60+
opts->Register("max-active", &max_active, "Decoder max active states.");
61+
opts->Register("lattice-beam", &lattice_beam, "Lattice generation beam");
62+
opts->Register("prune-interval", &prune_interval, "Interval (in frames) at "
63+
"which to prune tokens");
64+
opts->Register("determinize-lattice", &determinize_lattice, "If true, "
65+
"determinize the lattice (in a special sense, keeping only "
66+
"best pdf-sequence for each word-sequence).");
67+
opts->Register("beam-delta", &beam_delta, "Increment used in decoding");
68+
opts->Register("hash-ratio", &hash_ratio, "Setting used in decoder to control"
69+
" hash behavior");
70+
opts->Register("extra-beam", &extra_beam, "Increment used in decoding (added "
71+
"to worst tracked token from first pass)");
72+
opts->Register("max-beam", &max_beam, "Maximum beam (in case tracked tokens "
73+
"go too far from beam)");
7474

7575
}
7676
void Check() const {

src/decoder/nbest-decoder.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ struct NBestDecoderOptions {
4141
max_active(std::numeric_limits<int32>::max()),
4242
n_best(1),
4343
beam_delta(0.5), hash_ratio(2.0) { }
44-
void Register(OptionsItf *po, bool full) { /// if "full", use obscure
44+
void Register(OptionsItf *opts, bool full) { /// if "full", use obscure
4545
/// options too.
4646
/// Depends on program.
47-
po->Register("beam", &beam, "Decoder beam");
48-
po->Register("max-active", &max_active, "Decoder max active states.");
49-
po->Register("n-best", &n_best, "Decoder number of best tokens.");
47+
opts->Register("beam", &beam, "Decoder beam");
48+
opts->Register("max-active", &max_active, "Decoder max active states.");
49+
opts->Register("n-best", &n_best, "Decoder number of best tokens.");
5050
if (full) {
51-
po->Register("beam-delta", &beam_delta,
52-
"Increment used in decoder [obscure setting]");
53-
po->Register("hash-ratio", &hash_ratio,
54-
"Setting used in decoder to control hash behavior");
51+
opts->Register("beam-delta", &beam_delta,
52+
"Increment used in decoder [obscure setting]");
53+
opts->Register("hash-ratio", &hash_ratio,
54+
"Setting used in decoder to control hash behavior");
5555
}
5656
}
5757
};

src/decoder/training-graph-compiler.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ struct TrainingGraphCompilerOptions {
4242
rm_eps(false),
4343
reorder(b) { }
4444

45-
void Register(OptionsItf *po) {
46-
po->Register("transition-scale", &transition_scale, "Scale of transition "
47-
"probabilities (excluding self-loops)");
48-
po->Register("self-loop-scale", &self_loop_scale, "Scale of self-loop vs. "
49-
"non-self-loop probability mass ");
50-
po->Register("reorder", &reorder, "Reorder transition ids for greater decoding efficiency.");
51-
po->Register("rm-eps", &rm_eps, "Remove [most] epsilons before minimization (only applicable "
52-
"if disambig symbols present)");
45+
void Register(OptionsItf *opts) {
46+
opts->Register("transition-scale", &transition_scale, "Scale of transition "
47+
"probabilities (excluding self-loops)");
48+
opts->Register("self-loop-scale", &self_loop_scale, "Scale of self-loop vs. "
49+
"non-self-loop probability mass ");
50+
opts->Register("reorder", &reorder, "Reorder transition ids for greater decoding efficiency.");
51+
opts->Register("rm-eps", &rm_eps, "Remove [most] epsilons before minimization (only applicable "
52+
"if disambig symbols present)");
5353
}
5454
};
5555

src/feat/feature-fbank.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ struct FbankOptions {
5353
htk_compat(false),
5454
use_log_fbank(true) {}
5555

56-
void Register(OptionsItf *po) {
57-
frame_opts.Register(po);
58-
mel_opts.Register(po);
59-
po->Register("use-energy", &use_energy,
60-
"Add an extra dimension with energy to the FBANK output.");
61-
po->Register("energy-floor", &energy_floor,
62-
"Floor on energy (absolute, not relative) in FBANK computation");
63-
po->Register("raw-energy", &raw_energy,
64-
"If true, compute energy before preemphasis and windowing");
65-
po->Register("htk-compat", &htk_compat, "If true, put energy last. "
66-
"Warning: not sufficient to get HTK compatible features (need "
67-
"to change other parameters).");
68-
po->Register("use-log-fbank", &use_log_fbank,
69-
"If true, produce log-filterbank, else produce linear.");
56+
void Register(OptionsItf *opts) {
57+
frame_opts.Register(opts);
58+
mel_opts.Register(opts);
59+
opts->Register("use-energy", &use_energy,
60+
"Add an extra dimension with energy to the FBANK output.");
61+
opts->Register("energy-floor", &energy_floor,
62+
"Floor on energy (absolute, not relative) in FBANK computation");
63+
opts->Register("raw-energy", &raw_energy,
64+
"If true, compute energy before preemphasis and windowing");
65+
opts->Register("htk-compat", &htk_compat, "If true, put energy last. "
66+
"Warning: not sufficient to get HTK compatible features (need "
67+
"to change other parameters).");
68+
opts->Register("use-log-fbank", &use_log_fbank,
69+
"If true, produce log-filterbank, else produce linear.");
7070
}
7171
};
7272

0 commit comments

Comments
 (0)