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

# wordEmbedding(for:)

Retrieves a word embedding for a given language.

## Declaration

```swift
class func wordEmbedding(for language: NLLanguage) -> NLEmbedding?
```

## Parameters

- `language`: The language of the word embedding, such as doc://com.apple.naturallanguage/documentation/NaturalLanguage/NLLanguage/french.

## Mentioned in

Finding similarities between pieces of text

## Return Value

Return Value An NLEmbedding if available, otherwise nil.

## See Also

### Creating a word embedding

- [wordEmbedding(for:revision:)](naturallanguage/nlembedding/wordembedding(for:revision:).md)
- [init(contentsOf:)](naturallanguage/nlembedding/init(contentsof:).md)
