Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpectedMatchingBeamDecoder ¶
type ExpectedMatchingBeamDecoder struct { // Expected sequence of words/tokens ExpectedSequence []int // Vocabulary size of model VocabSize int // Size of beam BeamWidth int // CTC blank token ID BlankID int // Weights for scoring ExpectedMatchBonus float64 // Bonus for matching expected token InsertionPenalty float64 // Penalty for inserting a token not in expected sequence DeletionPenalty float64 // Penalty for skipping an expected token // Maximum lookahead in expected sequence MaxLookahead int }
ExpectedMatchingBeamDecoder implements a beam search decoder with expected matching
func (*ExpectedMatchingBeamDecoder) Decode ¶
func (d *ExpectedMatchingBeamDecoder) Decode(logProbs [][]float64) []int
Decode performs beam search decoding on acoustic model probabilities
type Hypothesis ¶
type Hypothesis struct { // Sequence of tokens/words decoded so far Tokens []int // Position in the expected output sequence ExpectedPos int // Cumulative log probability score Score float64 // Position in acoustic frames TimeStep int // contains filtered or unexported fields }
Hypothesis represents a partial decoding hypothesis
Click to show internal directories.
Click to hide internal directories.