# TextProofreaderOptions

    class TextProofreaderOptions: TaskOptions, NSCopying

Options for configuring a MediaPipe text proofreader task.
- `
  ### [cacheDirectory](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextProofreaderOptions.md.txt#/c:objc(cs)MPPTextProofreaderOptions(py)cacheDir)

  ` Cache directory for the model weight cache and program cache. By default, it will be set by LiteRT-LM engine based on the model file path.

  To disable caching, set this to @":nocache".

  #### Declaration

  Swift

      var cacheDirectory: String? { get set }

- `
  ### [maxNumTokens](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextProofreaderOptions.md.txt#/c:objc(cs)MPPTextProofreaderOptions(py)maxNumTokens)

  ` The maximum number of tokens for proofread tasks. If set, the result will be truncated if the input and output exceed this value.

  If not set, then the default maxNumTokens is based on the model's capacity.

  Default is 0.

  #### Declaration

  Swift

      var maxNumTokens: Int { get set }

- `
  ### [maxTokens](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextProofreaderOptions.md.txt#/c:objc(cs)MPPTextProofreaderOptions(py)maxTokens)

  `

  #### Declaration

  Swift

      var maxTokens: Int { get set }