<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSSpellServerDelegate/spellServer(_:recordResponse:toCorrection:forWord:language:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSSpellServerDelegate(im)spellServer:recordResponse:toCorrection:forWord:language:"
  },
  "title" : "spellServer(_:recordResponse:toCorrection:forWord:language:)"
}
-->

# spellServer(_:recordResponse:toCorrection:forWord:language:)

Notifies the spell checker of the users’s response to a correction.

```
optional func spellServer(_ sender: NSSpellServer, recordResponse response: Int, toCorrection correction: String, forWord word: String, language: String)
```

## Parameters

`sender`

The spell server.

`response`

The user’s response.

`correction`

The corrected word. This should match the original correction.

`word`

The original word. This should match the original correction.

`language`

The language being edited. This should match the original correction.

## Discussion

When the user accepts, rejects, or edits an autocorrection, the view notifies the <doc://com.apple.documentation/documentation/AppKit/NSSpellChecker> class of what happened in the client application, and `NSSpellChecker` then invokes this method, so that it can record that and modify future autocorrection behavior based on what it has learned from the user’s actions.

---

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)