---
title: NLContextualEmbeddingResult
framework: Natural Language
role: symbol
role_heading: Class
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/nlcontextualembeddingresult
---

# NLContextualEmbeddingResult

An object that represents the embedding vector result from applying a contextual embedding to a string.

## Declaration

```swift
class NLContextualEmbeddingResult
```

## Overview

Overview This object returns embeddings at the subword level, meaning a single word may generate multiple vectors, especially for rare or complex terms. If you need to work with whole-word embeddings or create single representations for entire text inputs, pool or combine subword vectors.

## Topics

### Inspecting the result

- [language](naturallanguage/nlcontextualembeddingresult/language.md)
- [sequenceLength](naturallanguage/nlcontextualembeddingresult/sequencelength.md)
- [string](naturallanguage/nlcontextualembeddingresult/string.md)

### Enumerating the vectors

- [enumerateTokenVectors(in:using:)](naturallanguage/nlcontextualembeddingresult/enumeratetokenvectors(in:using:).md)
- [tokenVector(at:)](naturallanguage/nlcontextualembeddingresult/tokenvector(at:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Applying an embedding

- [embeddingResult(for:language:)](naturallanguage/nlcontextualembedding/embeddingresult(for:language:).md)
