Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NanoNets/docstrange
/ functions
Functions
340 in github.com/NanoNets/docstrange
⨍
Functions
340
◇
Types & classes
41
↳
Endpoints
6
↓ 37 callers
Method
extract
Convert a file to internal format. Args: file_path: Path to the file to extract Returns:
docstrange/extractor.py:172
↓ 21 callers
Method
extract_data
Convert content to JSON format. Args: specified_fields: List of specific fields to extract (uses Ollama) json
docstrange/result.py:940
↓ 21 callers
Method
extract_markdown
Export as markdown. Returns: The content formatted as markdown
docstrange/result.py:704
↓ 13 callers
Method
get_model_path
Get the path to a specific model. Args: model_type: Type of model ('layout', 'table', 'nanonets-ocr')
docstrange/pipeline/model_downloader.py:205
↓ 11 callers
Method
extract_text
Export as plain text. Returns: The content as plain text
docstrange/result.py:1020
↓ 10 callers
Method
_load_document
Load and cache a document.
mcp_server_module/server.py:222
↓ 9 callers
Method
extract_text_with_layout
Extract text with layout awareness from image. Args: image_path: Path to the image file Returns:
docstrange/pipeline/ocr_service.py:27
↓ 7 callers
Method
_get_cloud_output
Get output from cloud API for specific type, with caching.
docstrange/processors/cloud_processor.py:26
↓ 7 callers
Method
create_service
Create OCR service based on provider configuration. Args: provider: OCR provider name (defaults to config)
docstrange/pipeline/ocr_service.py:194
↓ 7 callers
Method
extract_html
Export as HTML. Returns: The content formatted as HTML
docstrange/result.py:712
↓ 7 callers
Method
is_available
Check if Ollama service is available. Returns: True if Ollama is available and responding
docstrange/services/ollama_service.py:38
↓ 6 callers
Method
_escape_html
Escape HTML special characters.
docstrange/result.py:680
↓ 6 callers
Method
showError
(message)
docstrange/static/script.js:294
↓ 5 callers
Method
run
Run the MCP server.
mcp_server_module/server.py:738
↓ 4 callers
Method
_count_tokens
Count tokens in text using tiktoken or fallback to character estimation.
mcp_server_module/server.py:80
↓ 4 callers
Method
_get_client
Get Ollama client with lazy loading.
docstrange/services/ollama_service.py:25
↓ 4 callers
Method
_send_error_page
Send a styled error page.
docstrange/services/auth_service.py:206
↓ 4 callers
Function
check_gpu_availability
Check if GPU is available for processing.
docstrange/web_app.py:18
↓ 4 callers
Method
extract_csv
Export tables as CSV format. Args: table_index: Which table to export (0-based index). Default is 0 (first table).
docstrange/result.py:1028
↓ 4 callers
Method
get_cached_credentials
Get cached credentials if they exist and are valid.
docstrange/services/auth_service.py:382
↓ 4 callers
Method
get_supported_formats
Get list of supported file formats. Returns: List of supported file extensions
docstrange/extractor.py:344
↓ 4 callers
Function
is_gpu_available
Check if GPU is available for deep learning models. Returns: True if GPU is available, False otherwise
docstrange/utils/gpu_utils.py:9
↓ 4 callers
Function
run_command
Run a command and handle errors.
scripts/setup_dev.py:11
↓ 4 callers
Function
should_use_gpu_processor
Determine if GPU processor should be used based on GPU availability. Returns: True if GPU processor should be used, False otherwise
docstrange/utils/gpu_utils.py:61
↓ 3 callers
Method
_clean_inline_formatting
Clean inline markdown formatting from text.
docstrange/result.py:314
↓ 3 callers
Method
_get_ocr_service
Get OCR service instance.
docstrange/processors/gpu_processor.py:280
↓ 3 callers
Method
_get_section_chunks
Get document chunks that fit within token limit.
mcp_server_module/server.py:184
↓ 3 callers
Method
_parse_content
Parse content within a section into structured components.
docstrange/result.py:110
↓ 3 callers
Method
_process_inline_elements
Process inline markdown elements.
docstrange/result.py:627
↓ 3 callers
Method
_stop_callback_server
Stop the callback server.
docstrange/services/auth_service.py:374
↓ 3 callers
Method
clear_cached_credentials
Clear cached credentials.
docstrange/services/auth_service.py:424
↓ 3 callers
Method
extract_text
Convert plain text to internal format. Args: text: Plain text to extract Returns: Conver
docstrange/extractor.py:262
↓ 3 callers
Method
extract_text
Export as plain text without GPU processing header.
docstrange/processors/gpu_processor.py:229
↓ 3 callers
Function
get_authenticated_token
Convenience function to get an authenticated access token. Args: force_reauth: Force re-authentication even if cached credential
docstrange/services/auth_service.py:686
↓ 3 callers
Method
process
Process the file and return a conversion result. Args: file_path: Path to the file to process Return
docstrange/processors/base.py:42
↓ 3 callers
Method
process
Process PDF file with OCR capabilities. Args: file_path: Path to the PDF file Returns: C
docstrange/processors/pdf_processor.py:51
↓ 2 callers
Method
_clean_content
Clean up the extracted Word content. Args: content: Raw Word text content Returns: Clean
docstrange/processors/docx_processor.py:176
↓ 2 callers
Method
_clean_content
Clean up the extracted PowerPoint content. Args: content: Raw PowerPoint text content Returns:
docstrange/processors/pptx_processor.py:135
↓ 2 callers
Method
_collect_list_items
Collect consecutive list items.
docstrange/result.py:587
↓ 2 callers
Method
_convert_list_to_html
Convert list lines to HTML list.
docstrange/result.py:606
↓ 2 callers
Method
_convert_to_base_json
Fallback to base JSON conversion method.
docstrange/processors/gpu_processor.py:210
↓ 2 callers
Method
_dataframe_to_markdown
Convert pandas DataFrame to markdown table. Args: df: pandas DataFrame pd: pandas module reference
docstrange/processors/excel_processor.py:150
↓ 2 callers
Method
_extract_text_from_region_numpy
Extract text from numpy array region.
docstrange/pipeline/neural_document_processor.py:472
↓ 2 callers
Method
_join_paragraph_text_advanced
Join text blocks into a coherent paragraph with better text processing.
docstrange/pipeline/layout_detector.py:121
↓ 2 callers
Method
cache_credentials
Cache credentials securely.
docstrange/services/auth_service.py:406
↓ 2 callers
Method
download_models
Download all required models. Args: force: Force re-download even if models exist progress: Show download pro
docstrange/pipeline/model_downloader.py:61
↓ 2 callers
Method
extract_text
Extract text from image. Args: image_path: Path to the image file Returns: Extracted tex
docstrange/pipeline/ocr_service.py:15
↓ 2 callers
Method
get_access_token
Get access token, performing authentication if necessary. Args: force_reauth: Force re-authentication
docstrange/services/auth_service.py:619
↓ 2 callers
Function
get_file_size_mb
Get file size in MB.
tests/test_cloud_mode.py:16
↓ 2 callers
Method
get_metadata
Get metadata about the file. Args: file_path: Path to the file Returns: Dictionary conta
docstrange/processors/base.py:56
↓ 2 callers
Method
handleFileSelect
(file)
docstrange/static/script.js:78
↓ 2 callers
Function
handle_login
Handle login command.
docstrange/cli.py:103
↓ 2 callers
Method
hideResults
()
docstrange/static/script.js:345
↓ 2 callers
Function
main
Main entry point.
mcp_server_module/server.py:747
↓ 2 callers
Method
parse
Parse markdown text into structured JSON. Args: markdown_text: The markdown content to parse Returns
docstrange/result.py:31
↓ 2 callers
Function
run_web_app
Run the web application.
docstrange/web_app.py:198
↓ 1 callers
Method
__init__
(self, auth0_domain: str = "nanonets.auth0.com", client_id: str = "meAtfPTI
docstrange/services/auth_service.py:309
↓ 1 callers
Method
__init__
(self, preserve_layout: bool = True, include_images: bool = False, ocr_enabled: bool = True, use_markdownify:
docstrange/processors/gpu_processor.py:259
↓ 1 callers
Method
__init__
Initialize the cloud processor. Args: api_key: API key for cloud processing (optional - uses rate-limited free tier witho
docstrange/processors/cloud_processor.py:216
↓ 1 callers
Method
_build_hierarchical_structure
Build a hierarchical structure from flat sections list.
mcp_server_module/server.py:147
↓ 1 callers
Function
_check_numpy_version
Check NumPy version and warn about compatibility issues.
docstrange/pipeline/neural_document_processor.py:31
↓ 1 callers
Method
_classify_paragraph
Classify a paragraph as heading, list item, table row, or regular text.
docstrange/pipeline/layout_detector.py:188
↓ 1 callers
Method
_clean_content
Clean up the text content. Args: content: Raw text content Returns: Cleaned text content
docstrange/processors/txt_processor.py:80
↓ 1 callers
Method
_clean_content
Clean up the extracted web content. Args: content: Raw web text content Returns: Cleaned
docstrange/processors/url_processor.py:335
↓ 1 callers
Method
_convert_locally
Fallback to local conversion methods.
docstrange/processors/cloud_processor.py:121
↓ 1 callers
Method
_convert_pdf_to_images
Convert PDF pages to images. Args: pdf_path: Path to the PDF file Returns: List of paths
docstrange/processors/gpu_processor.py:452
↓ 1 callers
Method
_convert_table_to_html
Convert table lines to HTML table.
docstrange/result.py:483
↓ 1 callers
Method
_convert_table_to_markdown
Convert structured table to markdown format.
docstrange/pipeline/neural_document_processor.py:516
↓ 1 callers
Method
_convert_to_structured_markdown_advanced
Convert text blocks and tables to structured markdown.
docstrange/pipeline/neural_document_processor.py:549
↓ 1 callers
Method
_create_hierarchy
Create hierarchical structure from flat sections list.
docstrange/result.py:325
↓ 1 callers
Method
_detect_file_from_url
Detect if a URL points to a file and return file information. Args: url: URL to check Returns:
docstrange/processors/url_processor.py:64
↓ 1 callers
Method
_determine_heading_level
Determine heading level based on font size and position.
docstrange/pipeline/neural_document_processor.py:613
↓ 1 callers
Method
_determine_heading_level_from_text
Determine heading level based on text characteristics.
docstrange/pipeline/layout_detector.py:206
↓ 1 callers
Method
_download_from_hf
Download model from Hugging Face using docling's logic. Args: repo_id: Hugging Face repository ID revision: G
docstrange/pipeline/model_downloader.py:145
↓ 1 callers
Method
_download_from_s3
Download model from Nanonets S3. Args: s3_url: S3 URL of the model archive local_dir: Local directory to extr
docstrange/pipeline/model_downloader.py:248
↓ 1 callers
Method
_download_model
Download a specific model. Args: model_config: Model configuration dictionary force: Force re-download
docstrange/pipeline/model_downloader.py:97
↓ 1 callers
Method
_extract_blockquotes
Extract blockquotes from content.
docstrange/result.py:304
↓ 1 callers
Method
_extract_code_blocks
Extract code blocks from content.
docstrange/result.py:231
↓ 1 callers
Method
_extract_content_from_response
Extract content from API response.
docstrange/processors/cloud_processor.py:288
↓ 1 callers
Method
_extract_images
Extract images from content.
docstrange/result.py:274
↓ 1 callers
Method
_extract_json_with_model
Extract structured JSON using Nanonets model with specific prompt.
docstrange/processors/gpu_processor.py:100
↓ 1 callers
Method
_extract_links
Extract links from content.
docstrange/result.py:289
↓ 1 callers
Method
_extract_lists
Extract lists from content.
docstrange/result.py:177
↓ 1 callers
Method
_extract_main_content
Extract main content from the HTML. Args: soup: BeautifulSoup object Returns: Extracted
docstrange/processors/url_processor.py:306
↓ 1 callers
Method
_extract_markdown_tables_directly
Extract tables directly from markdown content as fallback.
docstrange/result.py:1108
↓ 1 callers
Method
_extract_paragraphs
Extract paragraphs from content.
docstrange/result.py:148
↓ 1 callers
Method
_extract_tables
Extract tables from content.
docstrange/result.py:246
↓ 1 callers
Method
_extract_text_advanced
Extract text using docling's advanced models.
docstrange/pipeline/neural_document_processor.py:290
↓ 1 callers
Method
_extract_text_from_region
Extract text from a specific region of the image.
docstrange/pipeline/neural_document_processor.py:623
↓ 1 callers
Method
_extract_text_with_layout_advanced
Extract text with layout awareness using docling's neural models.
docstrange/pipeline/neural_document_processor.py:309
↓ 1 callers
Method
_extract_text_with_nanonets
Extract text using Nanonets OCR model.
docstrange/pipeline/nanonets_processor.py:103
↓ 1 callers
Method
_format_table_row
Format text as a table row.
docstrange/pipeline/layout_detector.py:241
↓ 1 callers
Method
_generate_pkce_params
Generate PKCE code verifier and challenge.
docstrange/services/auth_service.py:328
↓ 1 callers
Method
_get_content_type
Get content type for file upload.
docstrange/processors/cloud_processor.py:303
↓ 1 callers
Method
_get_extractor
Lazily initialize the document extractor.
mcp_server_module/server.py:62
↓ 1 callers
Method
_get_file_hash
Calculate hash of a file for cache invalidation.
mcp_server_module/server.py:89
↓ 1 callers
Method
_get_ocr_service
Get OCR service instance.
docstrange/processors/image_processor.py:40
↓ 1 callers
Method
_get_processing_recommendation
Get processing recommendation based on token count.
mcp_server_module/server.py:307
↓ 1 callers
Method
_get_processor
Get the appropriate processor for the file. Args: file_path: Path to the file Returns: P
docstrange/extractor.py:306
↓ 1 callers
Method
_get_section_summary
Generate a summary of a section.
mcp_server_module/server.py:298
next →
1–100 of 340, ranked by callers