---
title: NLContextualEmbeddingKey
framework: Natural Language
role: symbol
role_heading: Structure
platforms: [iOS 12.0+, iPadOS 12.0+, Mac Catalyst 13.0+, macOS 10.14+, tvOS 12.0+, visionOS 1.0+, watchOS 5.0+]
path: naturallanguage/nlcontextualembeddingkey
---

# NLContextualEmbeddingKey

This class defines properties that you can filter or search for contextual embeddings.

## Declaration

```swift
struct NLContextualEmbeddingKey
```

## Overview

Overview The keys within this class provide filtering criteria that you can specify within your model. For example, you can use a defined key like scripts and search for models that use a specfic script like Latin.

## Topics

### Getting embedding keys

- [languages](naturallanguage/nlcontextualembeddingkey/languages.md)
- [revision](naturallanguage/nlcontextualembeddingkey/revision.md)
- [scripts](naturallanguage/nlcontextualembeddingkey/scripts.md)

### Creating embedding keys

- [init(_:)](naturallanguage/nlcontextualembeddingkey/init(_:).md)
- [init(rawValue:)](naturallanguage/nlcontextualembeddingkey/init(rawvalue:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Contextual embedding

- [NLContextualEmbedding](naturallanguage/nlcontextualembedding.md)
- [NLScript](naturallanguage/nlscript.md)
