SpokenLineTracker

class SpokenLineTracker(lines: List<String>, val quirks: RecognizerQuirks, val elisions: Elisions, val tokenizer: WordTokenizer)(source)

Checks a complete spoken attempt against one or more printed lines.

The whole transcript is aligned at once so one misrecognized word does not shift every word that follows it.

quirks, elisions and tokenizer have no default: each comes from the recogniser's or the work's data, and RecognizerQuirks.none is passed by name.

Constructors

Link copied to clipboard
constructor(lines: List<String>, quirks: RecognizerQuirks, elisions: Elisions, tokenizer: WordTokenizer)
constructor(line: String, quirks: RecognizerQuirks, elisions: Elisions, tokenizer: WordTokenizer)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Progress(val checks: List<WordCheck>)

The result for every expected word in one attempt.

Properties

Link copied to clipboard

The full forms of the elided spellings the work prints, from the work's data.

Link copied to clipboard

Printed words in passage order.

Link copied to clipboard

The number of expected words in each printed line.

Link copied to clipboard

Model-specific transcription allowances applied while checking.

Link copied to clipboard

Splits both the printed lines and every transcript checked against them.

Link copied to clipboard

States shown before an attempt: the first word expected and later words ahead.

Functions

Link copied to clipboard

Pairs the original printed spellings with their check results.

Link copied to clipboard
fun corrected(transcript: String): String

The transcript as its recogniser answers once its hearing table is applied.

Link copied to clipboard

Checks a complete recognized transcript against the tracked printed words.

Link copied to clipboard

Returns the part of a passage-wide state array belonging to one tracked line.