1 view
docling-project/docling
Get your documents ready for gen AI
Python★ 67,196+129 that day#6 on trending
C60.9/100
Duplication66
5.1% in python, latex, apex, bash, perlDead code83
2%Complexity44
60.3% The score is jscpd's own --health model: markup, data and text left out, tests kept. The numbers below are the trending scan's.
4.08%duplicated code · 3,635 of 89,007 lines
202clones in code
240code files of 1,115 scanned
26.74%duplicated over all files · 4,272 clones
Most complex files
- docling/backend/html_backend.py1198 cx
- docling/backend/msword_backend.py749 cx
- docling/backend/opendocument_backend.py445 cx
- tests/test_service_client_sdk_unit.py402 cx
- docling/backend/xml/uspto_backend.py361 cx
- docling/service_client/client.py329 cx
- tests/data/latex/sources/2501.00089/aastex631.cls326 cx
- docling/backend/xml/jats_backend.py299 cx
- docling/backend/msexcel_backend.py288 cx
- tests/test_backend_msword.py245 cx
Dead code 1.99% unused · 163 findings
- docling/experimental/pipeline/threaded_layout_vlm_pipeline.pyunused-file
- docling/models/stages/ocr/_nemotron_ocr_model.pyunused-file
- docling/document_extractor.pyunused-file
- docling/models/extraction/nuextract_transformers_model.pyunused-file
- docling/pipeline/extraction_vlm_pipeline.pyunused-file
- docling/models/extraction/transformers_extraction_model.pyunused-file
- docling/models/extraction/prompt_utils.pyunused-file
- docling/pipeline/base_extraction_pipeline.pyunused-file
- docling/models/stages/ocr/auto_ocr_model.py:EngineTypeunused-import
- docling/models/stages/ocr/auto_ocr_model.py:RapidOCRunused-import
The code number leaves out tests, fixtures, docs, examples, data files, styles, translations and vendored code.
Largest clones in the code
- 266 lines in 2 placespython1,235 tokensdocling/models/stages/ocr/_nemotron_ocr_model.py:175–440docling/models/stages/ocr/nemotron_ocr_model.py:206–471
175raise OcrLanguageNotSupportedError( 176 self._engine_name, 177 language.tag(), 178 supported=self.supported_ocr_languages(), 179 detail=( 180 "nemotron-OCR-v2 ships an English and a multilingual recognizer " 181 "only; write 'multilingual' to run the multilingual one." 182 ), 183) 184First 10 of 266 lines.
- 48 lines in 3 placespython270 tokensdocling/backend/msexcel_backend.py:1554–1601docling/backend/mspowerpoint_backend.py:1068–1115docling/backend/msword_backend.py:3665–3712
1554 columns.append((name, values)) 1555 1556num_data_rows = max([len(categories)] + [len(values) for _, values in columns]) 1557if num_data_rows == 0: 1558 return None 1559 1560num_rows = num_data_rows + 1 1561num_cols = 1 + len(columns) 1562cells: list[TableCell] = [] 1563First 10 of 48 lines.
- 105 lines in 2 placespython366 tokensdocling/models/stages/ocr/_nemotron_ocr_model.py:57–161docling/models/stages/ocr/nemotron_ocr_model.py:76–181
57# Mappings of nemotron language to the artifacts subdir. Also nemotron's own native vocabulary 58_NEMOTRON_CODE_TO_ARTIFACT = { 59 "english": "v2_english", 60 "multilingual": "v2_multilingual", 61} 62 63 64def nemotron_ocr_model_dir() -> str: 65 return _NEMOTRON_OCR_REPO_ID.replace("/", "--") 66First 10 of 105 lines.
7 more
- 15 lines in 6 placespython72 tokens
- 52 lines in 2 placespython276 tokens
- 17 lines in 3 placespython127 tokens
- 48 lines in 2 placespython251 tokens
- 23 lines in 3 placespython122 tokens
- 42 lines in 2 placespython238 tokens
- 42 lines in 2 placespython220 tokens
Largest clones over all files, tests and data included
- 5168 lines in 2 placesjsontests17,552 tokenstests/data/xlsx/groundtruth/xlsx_01.xlsx.json:12–5179tests/data/xlsx/groundtruth/xlsx_04_inflated.xlsx.json:12–5179
12 "children": [], 13 "content_layer": "furniture", 14 "name": "_root_", 15 "label": "unspecified" 16}, 17"body": { 18 "self_ref": "#/body", 19 "children": [ 20 { 21 "$ref": "#/groups/0"First 10 of 5168 lines.
- 276 lines in 3 placesapextests3,151 tokenstests/data/latex/sources/2501.00089/aastex631.cls:3817–4092tests/data/latex/sources/2501.00089/aastex631.cls:4124–4399tests/data/latex/sources/2501.00089/aastex631.cls:4440–4715
3817\ifcase\totalcolumncount% 3818\or% 3819\csname tab1\endcsname% 3820\or% 3821\csname tab1\endcsname&\csname tab2\endcsname% 3822\or% 3823\csname tab1\endcsname&\csname tab2\endcsname&% 3824\csname tab3\endcsname% 3825\or% 3826\csname tab1\endcsname&\csname tab2\endcsname&%First 10 of 276 lines.
- 466 lines in 4 placesjsontests1,630 tokenstests/data/csv/groundtruth/csv-comma.csv.json:885–1350tests/data/csv/groundtruth/csv-pipe.csv.json:885–1350tests/data/csv/groundtruth/csv-semicolon.csv.json:885–1350tests/data/csv/groundtruth/csv-tab.csv.json:885–1350
885 "text": "Martin, Lang and Andrade", 886 "column_header": false, 887 "row_header": false, 888 "row_section": false, 889 "fillable": false 890}, 891{ 892 "row_span": 1, 893 "col_span": 1, 894 "start_row_offset_idx": 5,First 10 of 466 lines.
- 1309 lines in 2 placesjsontests4,563 tokens
- 365 lines in 4 placesjsontests1,291 tokens
By format, code only
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| python | 227 | 87,680 | 202 | 3,635 | 4.15% |
| bash | 12 | 1,153 | 0 | 0 | 0% |
| perl | 1 | 174 | 0 | 0 | 0% |
By format, all files
| Format | Files | Lines | Clones | Duplicated lines | Duplication |
|---|---|---|---|---|---|
| json | 208 | 344,213 | 3,448 | 138,638 | 40.28% |
| python | 480 | 150,481 | 597 | 8,854 | 5.88% |
| apex | 4 | 9,540 | 78 | 1,188 | 12.45% |
| markdown | 267 | 31,456 | 77 | 1,643 | 5.22% |
| markup | 40 | 4,498 | 37 | 1,277 | 28.39% |
| yaml | 25 | 3,281 | 10 | 163 | 4.97% |
| latex | 24 | 19,200 | 9 | 59 | 0.31% |
| txt | 17 | 2,384 | 8 | 66 | 2.77% |
| toml | 5 | 1,736 | 6 | 187 | 10.77% |
| bash | 27 | 1,476 | 1 | 6 | 0.41% |
Trending appearances
| Day | Rank | Stars | Files | Lines | Clones | All files | Code | Health | Commit |
|---|---|---|---|---|---|---|---|---|---|
| Sep 20, 2026 | #6 | 67,196 (+129) | 1,115 | 568,797 | 4,272 | 26.74% | 4.08% | C 60.9 | 890dd42 |
Want this for your own project? Install jscpd and run jscpd ., or measure it the way the baselines were measured.