<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage/NLGazetteer/init(contentsOf:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Natural Language"
    ],
    "preciseIdentifier" : "c:objc(cs)NLGazetteer(im)initWithContentsOfURL:error:"
  },
  "title" : "init(contentsOf:)"
}
-->

# init(contentsOf:)

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

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

## Parameters

`url`

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

## Discussion

Use this initializer to create an [`NLGazetteer`](/documentation/NaturalLanguage/NLGazetteer) from an `.mlmodel` file saved by <doc://com.apple.documentation/documentation/CreateML/MLGazetteer> in the `Create ML` framework.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)