<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/tasks/python/text/text_summarizer.py#L45-L85) |

Options for the text summarizer task.

```python
mp.tasks.text.TextSummarizerOptions(
    base_options: `mp.tasks.BaseOptions`,
    mode: `mp.tasks.text.TextSummarizerMode` = Mode.KEYPOINTS,
    max_num_tokens: Optional[int] = None,
    cache_dir: Optional[str] = None,
    min_log_severity: Optional[int] = 4
)
```

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `base_options` | Base options for the text summarizer task. |
| `mode` | The mode of the text summarizer task. |
| `max_num_tokens` | The maximum number of tokens for summarization tasks. If set, the summarization will be truncated if the input and output exceed this value. If not set, then the default max_num_tokens is roughly 8k tokens due to the model's capacity. |
| `cache_dir` | Cache directory for the model weight cache and program cache. To disable caching, set this to ":nocache". |
| `min_log_severity` | Minimum logging severity (default 4 = ERROR). |

<br />

## Methods

### `to_ctypes`

[View source](https://github.com/google-ai-edge/mediapipe/blob/master/mediapipe/tasks/python/text/text_summarizer.py#L67-L85)

```python
to_ctypes() -> _MpTextSummarizerOptionsC
```

Generates a ctypes TextSummarizerOptionsC.

### `__eq__`

```python
__eq__(
    other
)
```

Return self==value.

<br />

<br />

<br />

| ## Class Variables ||
|---|---|
| cache_dir | `None` |
| max_num_tokens | `None` |
| min_log_severity | `4` |
| mode | `<Mode.KEYPOINTS: 1>` |

<br />