---
title: "init(script:)"
framework: Natural Language
role: symbol
role_heading: Initializer
platforms: [iOS 17.0+, iPadOS 17.0+, Mac Catalyst 17.0+, macOS 14.0+, tvOS 17.0+, visionOS 1.0+, watchOS 10.0+]
path: "naturallanguage/nlcontextualembedding/init(script:)"
---

# init(script:)

Creates a contextual embedding from a script.

## Declaration

```swift
init?(script: NLScript)
```

## Parameters

- `script`: The writing system the framework uses to find the most suitable system embedding for the value you specify; for example, Chinese or Latin.

## See Also

### Creating a contextual embedding

- [init(modelIdentifier:)](naturallanguage/nlcontextualembedding/init(modelidentifier:).md)
- [init(language:)](naturallanguage/nlcontextualembedding/init(language:).md)
