-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.yaml
More file actions
191 lines (154 loc) 路 5.35 KB
/
Copy pathconfig.yaml
File metadata and controls
191 lines (154 loc) 路 5.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# PDF to Markdown Converter Configuration
# Optimized for Apple Silicon (M1/M2/M3/M4) with MLX acceleration
# Model Configuration
model:
# Pipeline type:
# - vlm: Vision Language Model pipeline (fast, end-to-end, Apple Silicon optimized)
# Best for: Simple documents, speed priority, basic markdown output
# Does NOT support: OCR, table extraction, formula/code enrichment
#
# - standard: Standard pipeline with full feature support (slower, more accurate)
# Best for: Complex documents, tables, formulas, scanned PDFs
# Supports: All features (OCR, tables, formulas, enrichments)
pipeline_type: "standard"
# VLM model type (only used when pipeline_type: vlm)
# Options (Apple Silicon with MLX):
# - SMOLDOCLING_MLX: Fast, lightweight (256M params) - RECOMMENDED
# - GRANITEDOCLING_MLX: More accurate (258M params), slightly slower
vlm_model: "SMOLDOCLING_MLX"
# Input/Output Paths
paths:
# Input can be:
# - Single PDF file path
# - Directory containing PDFs (will process all PDFs)
# - URL to a PDF (e.g., https://arxiv.org/pdf/2408.09869)
# Leave empty to use command-line argument
input: ""
# Output directory for converted files
output: "./output"
# Preserve input directory structure in output
# Useful when processing nested directories
preserve_structure: true
# Output Configuration
output:
# Output format: markdown, json, html, doctags
# Can be a single format or a list of formats for multiple outputs
# Examples:
# format: "markdown" # Single format
# format: ["markdown", "json"] # Multiple formats
format: ["markdown"]
# Include images in output
include_images: true
# Image export mode:
# - referenced: Save images separately, reference in markdown
# - embedded: Embed images as base64 (larger files)
image_mode: "embedded"
# Image format: png, jpeg
image_format: "png"
# Image scale factor (1.0 = original size, 2.0 = double)
image_scale: 1.0
# Processing Options
processing:
# Enable OCR for scanned documents or images
enable_ocr: false
# OCR engine:
# - easyocr: Good balance of speed and accuracy
# - rapidocr: Fast, lightweight
# - tesseract: Most accurate, requires installation
# - ocrmac: macOS native OCR (fast, Apple Silicon optimized)
# - auto: Let Docling choose the best available
ocr_engine: "auto"
# Number of pages to process in parallel batch
# Higher = faster but more memory usage
# Recommended: 4 for 8GB RAM, 8 for 16GB+ RAM
page_batch_size: 8
# Maximum number of pages to process per document
# 0 = unlimited
max_pages: 0
# Maximum file size in MB
# 0 = unlimited
max_file_size_mb: 0
# Number of CPU threads for processing
# 0 = auto (uses OMP_NUM_THREADS or defaults to 4)
cpu_threads: 0
# Feature Toggles
# NOTE: Most features below only work with pipeline_type: standard
# VLM pipeline (faster) processes documents end-to-end and doesn't support these features
features:
# Table structure recognition
# Extracts tables with proper structure
# Only works with: pipeline_type: standard
table_structure: true
# Use cell matching for tables
# Maps recognized structure to PDF cells (more accurate)
# Only works with: pipeline_type: standard
table_cell_matching: true
# TableFormer mode: FAST or ACCURATE
# ACCURATE is slower but better for complex tables
# Only works with: pipeline_type: standard
table_mode: "ACCURATE"
# Code block enrichment
# Detects programming language in code blocks
# Only works with: pipeline_type: standard
code_enrichment: true
# Formula enrichment
# Extracts mathematical formulas as LaTeX
# Only works with: pipeline_type: standard
formula_enrichment: true
# Picture classification
# Classifies image types (chart, diagram, photo, etc.)
# Only works with: pipeline_type: standard
picture_classification: true
# Picture description
# Generates descriptions for images using VLM
# Only works with: pipeline_type: standard
# NOTE: Currently has issues with locally cached models
picture_description: false
# Advanced Options
advanced:
# Enable remote services (API calls to external services)
# Set to true if using remote OCR or VLM services
enable_remote_services: false
# Custom model artifacts path
# Empty = use default cache (~/.cache/docling/models)
artifacts_path: ""
# Verbose logging
verbose: false
# Fail on first error or continue processing
continue_on_error: true
# Batch Processing (when input is directory)
batch:
# Process files concurrently
# 1 = sequential, >1 = parallel processing
# Recommended: 1-2 for Apple Silicon to avoid memory issues
max_workers: 2
# File patterns to include (glob patterns)
include_patterns:
- "*.pdf"
- "*.PDF"
# File patterns to exclude
exclude_patterns:
- ".*" # Hidden files
- "*~" # Backup files
# Recursive directory traversal
recursive: true
# Export Options (for different output formats)
export:
# Markdown options
markdown:
# Include page breaks
page_breaks: true
# Image size in markdown (empty for original)
image_width: ""
# JSON options
json:
# Pretty print JSON output
indent: 2
# Include metadata
include_metadata: true
# HTML options
html:
# Include CSS styling
include_styles: true
# CSS style (light or dark)
theme: "light"