<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSpellChecker/completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSpellChecker(im)completionsForPartialWordRange:inString:language:inSpellDocumentWithTag:"
  },
  "title" : "completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)"
}
-->

# completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)

Provides a list of complete words that the user might be trying to type based on a partial word in a given string.

```
func completions(forPartialWordRange range: NSRange, in string: String, language: String?, inSpellDocumentWithTag tag: Int) -> [String]?
```

## Parameters

`range`

Range that identifies a partial word in `string`.

`string`

String with the partial word from which to generate the result.

`language`

Language to used in `string`. When `nil`, this method uses the language selected in the Spelling panel.

`tag`

Identifies the spell document with ignored words to use.

## Return Value

List of complete words from the spell checker dictionary in the order they should be presented to the user.

---

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)