score

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package score wraps SCTK tools and provides a simpler interface for scoring ASR hypotheses submitted in a variety of formats against reference transcripts.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Score

func Score(
	ctx context.Context, fileFormat FileFormat, normCfg NormalizeConfig, scliteCfg sctk.ScliteCfg,
	outDir, refFile string, hypFiles []sctk.Hypothesis,
) error

Types

type FileFormat

type FileFormat struct {
	Delimiter      rune
	ColTrn         int
	ColID          int
	IgnoreFirstRow bool
}

FileFormat specifies the expected format of reference and hypotheses files.

func (*FileFormat) Validate added in v0.2.0

func (f *FileFormat) Validate() error

Validate checks whether the options configured for the file format are consistent, and supported.

type NormalizeConfig

type NormalizeConfig struct {
	CaseSensitive    bool
	NormalizeUnicode bool
}

NormalizeConfig specifies how to normalize utterance transcripts.

type Utt

type Utt struct {
	ID         string
	Transcript string
}

An Utt contains the transcript of an utterance along with its ID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL