Learn R Programming

flashlighttext (version 0.1.0)

LexiconDecoderOptions: LexiconDecoderOptions

Description

LexiconDecoderOptions

LexiconDecoderOptions

Arguments

Value

LexiconDecoderOptions

Active bindings

beam_size

Maximum number of hypothesis we hold after each step

beam_size_token

Maximum number of tokens we consider at each step

beam_threshold

Threshold to prune hypothesis

lm_weight

Weight of lm

word_score

Word insertion score

unk_score

Unknown word insertion score

sil_score

Silence insertion score

log_add

If or not use logadd when merging hypothesis

criterion_type

a CriterionType: "CTC" or "ASG" (see [CriterionTypes])

ptr

set and get the pointer to a LexiconDecoderOptions instance.

Methods


Method new()

Usage

LexiconDecoderOptions$new(
  beam_size,
  beam_size_token,
  beam_threshold,
  lm_weight,
  word_score,
  unk_score,
  sil_score,
  log_add,
  criterion_type
)

Arguments

beam_size

Maximum number of hypothesis we hold after each step

beam_size_token

Maximum number of tokens we consider at each step

beam_threshold

Threshold to prune hypothesis

lm_weight

Weight of lm

word_score

Word insertion score

unk_score

Unknown word insertion score

sil_score

Silence insertion score

log_add

If or not use logadd when merging hypothesis

criterion_type

a CriterionType: "CTC" or "ASG" (see [CriterionTypes])

Examples

opts <- LexiconDecoderOptions$new(
  beam_size = 2500,
  beam_size_token = 25000,
  beam_threshold = 100.0,
  lm_weight = 2.0,
  word_score = 2.0,
  unk_score = -Inf,
  sil_score = -1,
  log_add = FALSE,
  criterion_type = CriterionTypes$ASG
)


Method clone()

The objects of this class are cloneable with this method.

Usage

LexiconDecoderOptions$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code

## ------------------------------------------------
## Method `LexiconDecoderOptions$new`
## ------------------------------------------------

opts <- LexiconDecoderOptions$new(
  beam_size = 2500,
  beam_size_token = 25000,
  beam_threshold = 100.0,
  lm_weight = 2.0,
  word_score = 2.0,
  unk_score = -Inf,
  sil_score = -1,
  log_add = FALSE,
  criterion_type = CriterionTypes$ASG
)

Run the code above in your browser using DataLab