---
title: "init(contentsOf:)"
framework: naturallanguage
role: symbol
role_heading: Initializer
path: "naturallanguage/nlembedding/init(contentsof:)"
---

# init(contentsOf:)

Creates a word embedding from a model file.

## Declaration

```swift
convenience init(contentsOf url: URL) throws
```

## Parameters

- `url`: The location of the .mlmodel file that contains a word embedding.

## Discussion

Discussion Use this initializer to create a word embedding from an .mlmodel file saved by Create ML’s MLWordEmbedding.

## See Also

### Creating a word embedding

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