🔍 Code Extractor

Browse Components

Showing 20 of 2143 components

  • class DocumentProcessor

    A comprehensive document processing class that converts documents to PDF, adds audit trails, applies security features (watermarks, signatures, hashing), and optionally converts to PDF/A format with document protection.

    File: /tf/active/vicechatdev/document_auditor/src/document_processor.py | Lines: 16-175

    document-processing pdf-generation audit-trail security watermarking
  • class DocumentProcessor_v1

    A document processing class that extracts text from PDF and Word documents using llmsherpa as the primary method with fallback support for PyPDF2, pdfplumber, and python-docx.

    File: /tf/active/vicechatdev/contract_validity_analyzer/utils/document_processor_new.py | Lines: 13-302

    document-processing text-extraction pdf-processing word-processing llmsherpa
  • class DocumentConverter_v1

    A class that converts various document formats (Word, Excel, PowerPoint, images) to PDF format using LibreOffice, unoconv, or PIL.

    File: /tf/active/vicechatdev/document_auditor/src/document_converter.py | Lines: 8-136

    document-conversion pdf file-processing office-documents image-to-pdf
  • function create_signature_image

    Generates a synthetic signature image for a given name, either as stylized text or as a random hand-drawn curve, and saves it as a PNG file with transparent background.

    File: /tf/active/vicechatdev/document_auditor/generate_sample_signatures.py | Lines: 17-140

    image-generation signature PIL graphics document-generation
  • class SharePointClient_v1

    Comprehensive SharePoint client using app-only authentication. Requires Azure AD app registration with appropriate SharePoint permissions.

    File: /tf/active/vicechatdev/Sharepoint/sharepoint_client.py | Lines: 11-540

    class sharepointclient
  • class ProgressLogger

    A progress tracking logger that monitors and reports the progress of long-running operations with timing statistics, error counts, and estimated completion times.

    File: /tf/active/vicechatdev/contract_validity_analyzer/utils/logging_utils.py | Lines: 147-226

    progress-tracking logging monitoring batch-processing performance-metrics
  • function log_performance

    A context manager decorator that logs the performance metrics of an operation by wrapping it with a PerformanceLogger instance.

    File: /tf/active/vicechatdev/contract_validity_analyzer/utils/logging_utils.py | Lines: 129-145

    performance logging context-manager monitoring profiling
  • function setup_logging

    Configures and initializes a Python logging system with both console and rotating file handlers, supporting customizable log levels, formats, and file rotation policies.

    File: /tf/active/vicechatdev/contract_validity_analyzer/utils/logging_utils.py | Lines: 12-66

    logging configuration file-handling log-rotation console-output
  • class FileCloudClient_v1

    A client class for interacting with FileCloud storage systems through direct API calls, providing authentication, file search, download, and metadata retrieval capabilities.

    File: /tf/active/vicechatdev/contract_validity_analyzer/utils/filecloud_client.py | Lines: 17-383

    filecloud storage api-client file-management document-management
  • class ContractAnalyzer

    Main class for analyzing contract validity from FileCloud documents.

    File: /tf/active/vicechatdev/contract_validity_analyzer/core/analyzer.py | Lines: 28-567

    class contractanalyzer
  • function load_config_v1

    Parses a .env file and loads key-value pairs into a dictionary, ignoring comments and handling errors gracefully.

    File: /tf/active/vicechatdev/SPFCsync/grant_sharepoint_access.py | Lines: 10-22

    configuration environment-variables file-parsing dotenv settings
  • function test_llm_extraction

    A test function that validates LLM-based contract data extraction by processing a sample contract and verifying the extracted fields against expected values.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_extractor.py | Lines: 67-161

    testing contract-extraction llm validation integration-test
  • function test_simulated_document

    Integration test function that validates end date extraction from a simulated contract document containing an explicit term clause, using a two-step LLM-based analysis process.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_simulated_document.py | Lines: 49-141

    testing integration-test contract-analysis date-extraction llm-client
  • function setup_test_logging_v4

    Configures Python logging with both console and file output for test execution, returning a logger instance for the calling module.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_simulated_document.py | Lines: 37-47

    logging testing configuration setup file-output
  • function test_edge_cases

    Tests edge cases and variations in European tax ID formats by analyzing a sample contract document containing Swiss, Norwegian, Swedish, and Danish tax identifiers.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_international_tax_ids.py | Lines: 165-226

    testing tax-id-extraction european-formats contract-analysis llm-validation
  • function test_international_tax_ids

    A test function that validates an LLM client's ability to extract tax identification numbers and business registration numbers from a multi-party international contract document across 8 different countries.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_international_tax_ids.py | Lines: 18-163

    testing llm document-analysis tax-id-extraction international
  • function test_new_fields

    A test function that validates an LLM client's ability to extract third-party email addresses and tax identification numbers from contract documents.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_new_fields.py | Lines: 18-104

    testing llm contract-analysis email-extraction tax-id-extraction
  • function test_excel_output

    A test function that validates Excel output generation for contract analysis results, ensuring new fields (third_party_emails, third_party_tax_ids) are properly formatted and persisted.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_excel_output.py | Lines: 13-114

    testing unit-test excel data-validation contract-analysis
  • function test_ocr_retry_logic

    Tests the OCR retry logic for extracting contract end dates by first attempting normal text extraction, then falling back to OCR-based extraction if the end date is not found.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_ocr_retry.py | Lines: 34-146

    testing ocr document-processing pdf-extraction contract-analysis
  • function setup_test_logging_v3

    Configures Python logging with both console and file output for test execution, returning a logger instance for the calling module.

    File: /tf/active/vicechatdev/contract_validity_analyzer/test_ocr_retry.py | Lines: 22-32

    logging testing configuration setup debugging