Index
anthropic
The antrhopic implementation of page level calssification.
AnthropicClassificationProvider
Bases: BaseClassificationProvider
The Anthropic implementation of unscored page classification.
Source code in docprompt/tasks/classification/anthropic.py
AnthropicPageClassificationOutputParser
Bases: BasePageClassificationOutputParser
The output parser for the page classification system.
Source code in docprompt/tasks/classification/anthropic.py
parse(text)
Parse the results of the classification task.
Source code in docprompt/tasks/classification/anthropic.py
base
BaseClassificationProvider
Bases: AbstractPageTaskProvider[bytes, ClassificationConfig, ClassificationOutput]
The base classification provider.
Source code in docprompt/tasks/classification/base.py
BasePageClassificationOutputParser
Bases: ABC
, BaseOutputParser[ClassificationConfig, ClassificationOutput]
The output parser for the page classification system.
Source code in docprompt/tasks/classification/base.py
resolve_confidence(_match)
Get the confidence level from the text.
resolve_match(_match)
Get the regex pattern for the output parser.
Source code in docprompt/tasks/classification/base.py
ClassificationConfig
Bases: BaseModel
Source code in docprompt/tasks/classification/base.py
formatted_labels
property
Produce the formatted labels for the prompt template.
validate_label_bindings(data)
Validate the the label/description bindings based on the type.