<!--
{
  "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/PhraseCountsFromTemplates",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Speech"
    ],
    "preciseIdentifier" : "s:6Speech25SFCustomLanguageModelDataC25PhraseCountsFromTemplatesV"
  },
  "title" : "SFCustomLanguageModelData.PhraseCountsFromTemplates"
}
-->

# SFCustomLanguageModelData.PhraseCountsFromTemplates

A type that can be used to construct custom language model data by specifying a set of template classes and using the
result builder DSL to specify templates.

```
struct PhraseCountsFromTemplates
```

## Topics

### Creating weighted phrases from templates

[`init(classes: [String : [String]], builder: () -> any TemplateInsertable)`](/documentation/Speech/SFCustomLanguageModelData/PhraseCountsFromTemplates/init(classes:builder:))

## Relationships

### Conforms To

[`DataInsertable`](/documentation/Speech/DataInsertable)

---

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)