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

# sentenceEmbedding(for:)

Retrieves a sentence embedding for a given language.

## Declaration

```swift
class func sentenceEmbedding(for language: NLLanguage) -> 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.

## Mentioned in

Finding similarities between pieces of text

## Return Value

Return Value An NLEmbedding if available, otherwise nil.

## See Also

### Creating a sentence embedding

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