MCPcopy Create free account
hub / github.com/docling-project/docling-parse / DecodeConfig

Class DecodeConfig

docling_parse/pdf_parser.py:245–267  ·  view source on GitHub ↗

How to compute page content (tuning, not selection). Fixed when the document is opened; the C++ page-decoder cache freezes these at first decode, so they cannot vary per page. Entity selection lives on ContentConfig instead.

Source from the content-addressed store, hash-verified

243
244
245class DecodeConfig(BaseModel):
246 """How to compute page content (tuning, not selection).
247
248 Fixed when the document is opened; the C++ page-decoder cache freezes these
249 at first decode, so they cannot vary per page. Entity selection lives on
250 ContentConfig instead.
251 """
252
253 model_config = ConfigDict(validate_assignment=True)
254
255 do_sanitization: bool = True
256 enforce_same_font: bool = True
257 horizontal_cell_tolerance: float = 1.0
258 word_space_width_factor_for_merge: float = 0.33
259 line_space_width_factor_for_merge: float = 1.0
260 line_space_width_factor_for_merge_with_space: float = 0.33
261 max_num_lines: int = -1
262 max_num_bitmaps: int = -1
263 min_visible_clip_extent: float = 1e-3
264 do_thread_safe: bool = True
265 release_native_memory_every_n_pages: int = 0
266 keep_glyphs: bool = False
267 keep_qpdf_warnings: bool = False
268
269
270def _compile_decode_config(

Callers 13

visualise_pyFunction · 0.90
_runnerFunction · 0.90
_decode_configFunction · 0.90
_make_decode_configFunction · 0.90
_make_decode_configFunction · 0.90
_make_bitmap_configFunction · 0.90
_make_decode_configFunction · 0.90
_make_bitmap_configFunction · 0.90
_make_parserFunction · 0.90
__init__Method · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by 6

_make_decode_configFunction · 0.72
_make_bitmap_configFunction · 0.72
_make_decode_configFunction · 0.72
_make_bitmap_configFunction · 0.72
_make_parserFunction · 0.72