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

# init(contentsOf:)

Creates a Natural Language gazetteer from a model created with the Create ML framework.

## Declaration

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

## Parameters

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

## Discussion

Discussion Use this initializer to create an NLGazetteer from an .mlmodel file saved by MLGazetteer in the Create ML framework.

## See Also

### Creating a Gazetteer

- [init(data:)](naturallanguage/nlgazetteer/init(data:).md)
- [init(dictionary:language:)](naturallanguage/nlgazetteer/init(dictionary:language:).md)
- [write(_:language:to:)](naturallanguage/nlgazetteer/write(_:language:to:).md)
