---
title: "sentenceEmbedding(for:revision:)"
framework: naturallanguage
role: symbol
role_heading: Type Method
path: "naturallanguage/nlembedding/sentenceembedding(for:revision:)"
---

# sentenceEmbedding(for:revision:)

Retrieves a sentence embedding for a given language and revision.

## Declaration

```swift
class func sentenceEmbedding(for language: NLLanguage, revision: Int) -> NLEmbedding?
```

## Parameters

- `language`: The language of the sentence embedding, such as doc://com.apple.naturallanguage/documentation/NaturalLanguage/NLLanguage/french. For possible values, see doc://com.apple.naturallanguage/documentation/NaturalLanguage/NLLanguage.
- `revision`: The revision of the sentence embedding.

## Return Value

Return Value An NLEmbedding if available, otherwise nil.

## See Also

### Creating a sentence embedding

- [sentenceEmbedding(for:)](naturallanguage/nlembedding/sentenceembedding(for:).md)
