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

# SFCustomLanguageModelData.DataInsertableBuilder

A custom parameter attribute that constructs custom language model data from closures.

```
@resultBuilder struct DataInsertableBuilder
```

## Overview

The `SFCustomLanguageModelData` class provides two methods for accumulating data: manually
constructing `PhraseCount` and `CustomPronunciation` objects and providing them using the `insert`
methods defined below, or by using the result builder DSL upon initialization. This type supports the latter.

## Topics

### Result builder methods

[`static func buildArray([any DataInsertable]) -> any DataInsertable`](/documentation/Speech/SFCustomLanguageModelData/DataInsertableBuilder/buildArray(_:))

Enables support for `for..in` loops.

[`static func buildBlock(any DataInsertable...) -> any DataInsertable`](/documentation/Speech/SFCustomLanguageModelData/DataInsertableBuilder/buildBlock(_:))

Combines statement blocks into a single product.

[`static func buildEither(first: any DataInsertable) -> any DataInsertable`](/documentation/Speech/SFCustomLanguageModelData/DataInsertableBuilder/buildEither(first:))

Enables support for `if-else` and `switch` constructs.

[`static func buildEither(second: any DataInsertable) -> any DataInsertable`](/documentation/Speech/SFCustomLanguageModelData/DataInsertableBuilder/buildEither(second:))

Enables support for `if-else` and `switch` constructs.

[`static func buildOptional((any DataInsertable)?) -> any DataInsertable`](/documentation/Speech/SFCustomLanguageModelData/DataInsertableBuilder/buildOptional(_:))

Enables support for `if` statements that do not have an `else` clause.



---

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)