This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/settings/form-labeling-settings.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. FormLabelingSettings

Settings for FormLabeling. Values fall back through three levels: document → SDK → built-in default. Writes target the document only when set on a document’s settings, otherwise the SDK globally when set on SdkSettings.

Tags: Advanced, Vision

from nutrient_sdk import FormLabelingSettings

Construction

FormLabelingSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.

# Per-document override
with Document.open("input.pdf") as doc:
settings = doc.settings.form_labeling_settings
settings.some_field = new_value # mutate fields directly
# SDK-wide default (applies to all documents)
SdkSettings.form_labeling_settings.some_field = new_value

Settings are configured by writing to fields on the returned object. The settings property itself cannot be reassigned — doc.settings.form_labeling_settings = other_settings is rejected.

Properties

candidate_labels

@property
def candidate_labels(self) -> str
@candidate_labels.setter
def candidate_labels(self, value: str) -> None

Optional vocabulary of candidate labels the model should prefer when labeling. Provide labels as a newline- or comma-separated list (for example, “First name, Last name, Date of birth”). The model matches a field to one of these when it fits, and proposes a new label otherwise; each field’s FormFieldNode.LabelSource records whether the label was “matched” or “invented”. Matched labels are normalized to the casing given here. Empty (default) means fully free-form labeling.

Type: str

Default: string.Empty


enable_ai_labeling

@property
def enable_ai_labeling(self) -> bool
@enable_ai_labeling.setter
def enable_ai_labeling(self, value: bool) -> None

Opt in to AI semantic labeling of detected form fields. When false (default), form detection runs offline and no vision model is contacted; when true, the labeler draws numbered marks on the page and queries the provider configured via .

Type: bool

Default: false


enable_ai_remove_false_positives

@property
def enable_ai_remove_false_positives(self) -> bool
@enable_ai_remove_false_positives.setter
def enable_ai_remove_false_positives(self, value: bool) -> None

When true, form fields the AI flags as false positives are removed from the document graph so they never reach the exported output. When false (default), flagged fields are kept and annotated (non-destructive). Only takes effect when is true.

Type: bool

Default: false