One Logo Pool Ball
Speech · IOS API REFERENCE

SFCustomLanguageModelData.TemplatePhraseCountGenerator

class · iOS 17.0+ · SDK 27.1

class TemplatePhraseCountGenerator

A `PhraseCountGenerator` that produces `PhraseCount` values based on templates.

Members (4)

method · iOS 17.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): SFCustomLanguageModelData_PhraseCountGenerator_Iterator
Swift declaration
override func makeAsyncIterator() -> SFCustomLanguageModelData.PhraseCountGenerator.Iterator
method · iOS 17.0+

define

TypeScript
define(className: string, values: Array<string>): void
Swift declaration
func define(className: String, values: [String])

Define a class of tokens to be used in template strings. - Parameters: - className: A string which will appear in template strings inside of angle brackets. - values: The set of values which may be substituted into the template strings.

method · iOS 17.0+

insert

TypeScript
insert(template: string, count: number): void
Swift declaration
func insert(template: String, count: Int)

Add a template to be used to generate data samples. - Parameters: - template: A string, possibly containing references to classes enclosed in angle brackets. - count: the total number of data samples that will be generated by expanding the template string.

init · iOS 17.0+

init

TypeScript
static init(): SFCustomLanguageModelData_TemplatePhraseCountGenerator
Swift declaration
override init()

Skipped declarations

No declarations were skipped in this snapshot.

All Speech types →