regex
regex
¶
Classes:
| Name | Description |
|---|---|
RegexCandidate |
A regex match supplied to a user-defined local validator. |
RegexValidationResult |
Result returned by a user-defined local regex validator. |
RegexLimits |
Per-record, per-rule bounds shared by built-in and custom regex rules. |
BuiltinRegex |
Configuration for one recognizer from the built-in regex registry. |
RegexRule |
A user-defined regex rule for producing entity candidates. |
RegexCandidate(value, start, end, groups, context, rule_id)
dataclass
¶
A regex match supplied to a user-defined local validator.
RegexValidationResult(valid, reason=None)
dataclass
¶
Result returned by a user-defined local regex validator.
RegexLimits
pydantic-model
¶
Bases: BaseModel
Per-record, per-rule bounds shared by built-in and custom regex rules.
Config:
extra:forbidhide_input_in_errors:True
Fields:
-
max_matches_per_rule(int) -
min_timeout_seconds(float) -
timeout_seconds_per_million_characters(float)
BuiltinRegex
pydantic-model
¶
Bases: BaseModel
Configuration for one recognizer from the built-in regex registry.
Config:
extra:forbid
Fields:
-
label(str) -
enabled(bool) -
validate_matches_with_llm(bool) -
detect_additional_matches(bool)
Validators:
-
validate_label→label
RegexRule
pydantic-model
¶
Bases: BaseModel
A user-defined regex rule for producing entity candidates.
Config:
arbitrary_types_allowed:Trueextra:forbid
Fields:
-
label(str) -
pattern(str) -
validator(RegexValidatorCallable | str | None) -
enabled(bool) -
validate_matches_with_llm(bool) -
detect_additional_matches(bool)
Validators:
-
validate_label→label -
validate_pattern→pattern -
validate_validator→validator