---
title: "write(toFile:metadata:)"
framework: createml
role: symbol
role_heading: Instance Method
path: "createml/mlwordtagger/write(tofile:metadata:)"
---

# write(toFile:metadata:)

Exports the word tagger as a Core ML model file at the specified file path.

## Declaration

```swift
func write(toFile path: String, metadata: MLModelMetadata? = nil) throws
```

## Parameters

- `path`: A file system path where the model file should be written.
- `metadata`: Descriptive information to include with the exported model file.

## See Also

### Saving a word tagger

- [write(to:metadata:)](createml/mlwordtagger/write(to:metadata:).md)
