mp.tasks.text.TextProofreaderOptions
Stay organized with collections
Save and categorize content based on your preferences.
Options for the text proofreader task.
mp.tasks.text.TextProofreaderOptions(
base_options: mp.tasks.BaseOptions,
max_num_tokens: Optional[int] = None,
cache_dir: Optional[str] = None,
min_log_severity: Optional[int] = 4
)
Attributes |
base_options
|
Base options for the text proofreader task.
|
max_num_tokens
|
The maximum number of tokens for proofreader tasks. If set,
the proofread output text 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).
|
Methods
to_ctypes
View source
to_ctypes() -> _MpTextProofreaderOptionsC
Generates a ctypes TextProofreaderOptionsC.
__eq__
__eq__(
other
)
Return self==value.
Class Variables |
|
cache_dir
|
None
|
|
max_num_tokens
|
None
|
|
min_log_severity
|
4
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-11-05 UTC.
[null,null,["Last updated 2026-11-05 UTC."],[],[]]