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 FormLabelingSettingsConstruction
FormLabelingSettings is accessed through a Document instance for per-document overrides, or via SdkSettings for SDK-wide defaults.
# Per-document overridewith 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_valueSettings 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
@propertydef candidate_labels(self) -> str
@candidate_labels.setterdef candidate_labels(self, value: str) -> NoneOptional 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
@propertydef enable_ai_labeling(self) -> bool
@enable_ai_labeling.setterdef enable_ai_labeling(self, value: bool) -> NoneOpt 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
@propertydef enable_ai_remove_false_positives(self) -> bool
@enable_ai_remove_false_positives.setterdef enable_ai_remove_false_positives(self, value: bool) -> NoneWhen 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