<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Speech",
  "identifier" : "/documentation/Speech/SFCustomLanguageModelData/TemplatePhraseCountGenerator/define(className:values:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech25SFCustomLanguageModelDataC28TemplatePhraseCountGeneratorC6define9className6valuesySS_SaySSGtF"
  },
  "title" : "define(className:values:)"
}
-->

# define(className:values:)

Define a class of tokens to be used in template strings.

```
func define(className: String, values: [String])
```

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)