Download src/document_intelligence/extraction/__init__.py from MHamdan/SPARKNET: direct link, hf CLI and curl.
- Browser
- Download file 958 Bytes
-
https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/src/document_intelligence/extraction/__init__.py
- Command line
-
hf download hf://spaces/MHamdan/SPARKNET@76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/src/document_intelligence/extraction/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/MHamdan/SPARKNET/resolve/76c3b0a8cd44eb930c2ad41fc0e95acdb3cd2bab/src/document_intelligence/extraction/__init__.py
958 Bytes
| """ | |
| Document Intelligence Extraction Module | |
| Schema-driven field extraction with validation: | |
| - ExtractionSchema: Define fields to extract | |
| - FieldExtractor: Extract values with evidence | |
| - ExtractionValidator: Validate results | |
| """ | |
| from .schema import ( | |
| FieldType, | |
| FieldSpec, | |
| ExtractionSchema, | |
| # Pre-built schemas | |
| create_invoice_schema, | |
| create_receipt_schema, | |
| create_contract_schema, | |
| ) | |
| from .extractor import ( | |
| ExtractionConfig, | |
| FieldExtractor, | |
| ) | |
| from .validator import ( | |
| ValidationIssue, | |
| ValidationResult, | |
| ExtractionValidator, | |
| CrossFieldValidator, | |
| ) | |
| __all__ = [ | |
| # Schema | |
| "FieldType", | |
| "FieldSpec", | |
| "ExtractionSchema", | |
| "create_invoice_schema", | |
| "create_receipt_schema", | |
| "create_contract_schema", | |
| # Extraction | |
| "ExtractionConfig", | |
| "FieldExtractor", | |
| # Validation | |
| "ValidationIssue", | |
| "ValidationResult", | |
| "ExtractionValidator", | |
| "CrossFieldValidator", | |
| ] | |