Repository Analysis

Yuliang-Liu/MonkeyOCR

A lightweight LMM-based Document Parsing Model

25.8 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of Yuliang-Liu/MonkeyOCR, a Python project with 6,601 GitHub stars. SynthScan v2.0 examined 14,468 lines of code across 109 source files, recording 271 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 25.8 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

25.8
Adjusted Score
25.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
6.6K
Stars
Python
Language
14.5K
Lines of Code
109
Files
271
Pattern Hits
2026-07-14
Scan Date
0.16
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 17MEDIUM 21LOW 233

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 271 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Excessive Try-Catch Wrapping85 hits · 104 pts
SeverityFileLineSnippetContext
MEDIUMparse.py328 print(f"Error while saving results for file '{file_name}'. Skipping this file's outputs.", file=sys.stdeCODE
LOWparse.py114 except Exception as e:CODE
LOWparse.py137 except Exception as e:CODE
LOWparse.py205 except Exception as e:CODE
LOWparse.py326 except Exception:CODE
LOWparse.py381 except Exception as e:CODE
LOWparse.py423 except Exception as cleanup_error:CODE
LOWparse.py426 except Exception as e:CODE
LOWparse.py477 except Exception as e:CODE
LOWparse.py526 except Exception as cleanup_error:CODE
LOWparse.py531 except Exception as e:CODE
LOWparse.py792 except Exception as e:STRING
LOWparse.py810 except Exception as cleanup_error:STRING
LOWmagic_pdf/utils/load_image.py36 except Exception as error:CODE
LOWmagic_pdf/utils/load_image.py92 except Exception as error:CODE
LOWmagic_pdf/libs/pdf_check.py28 except Exception as e:CODE
MEDIUMmagic_pdf/model/custom_model.py173def __init__(self, model_path, dp=1, tp=1): CODE
MEDIUMmagic_pdf/model/custom_model.py520def __init__(self, model_path, dp=1, tp=1, max_batch_size=32, queue_timeout=0.1,CODE
MEDIUMmagic_pdf/model/custom_model.py885def __init__(self, model_path, tp=1, max_batch_size=64, queue_timeout=0.1, max_qCODE
LOWmagic_pdf/model/custom_model.py665 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py674 except Exception:CODE
LOWmagic_pdf/model/custom_model.py677 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1027 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1036 except Exception:CODE
LOWmagic_pdf/model/custom_model.py1039 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py294 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py338 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py345 except Exception as single_e:CODE
LOWmagic_pdf/model/custom_model.py464 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py503 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py599 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py695 except Exception as set_error:CODE
LOWmagic_pdf/model/custom_model.py733 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py767 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py822 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py861 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py870 except Exception:CODE
LOWmagic_pdf/model/custom_model.py950 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1057 except Exception as set_error:CODE
LOWmagic_pdf/model/custom_model.py1095 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1129 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1184 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1223 except Exception as e:CODE
LOWmagic_pdf/model/custom_model.py1232 except Exception:CODE
LOWmagic_pdf/model/async_vllm.py79 except Exception as abort_err:CODE
LOWmagic_pdf/model/async_vllm.py95 except Exception as e:CODE
LOWmagic_pdf/model/async_vllm.py131 except Exception as e:CODE
LOWmagic_pdf/filter/pdf_classify_by_type.py340 except Exception as e:CODE
LOWmagic_pdf/data/read_api.py111 except Exception as e:CODE
LOWmagic_pdf/data/dataset.py350 except Exception:CODE
LOWdemo/demo_gradio.py138 except Exception as e:STRING
LOWdemo/demo_gradio.py213 except Exception:STRING
LOWdemo/demo_gradio.py267 except Exception as e:CODE
MEDIUMtools/fix_qwen2_5_vl_awq.py16 print(f"Error: calibrate.py file not found, expected path: {calibrate_file}")CODE
MEDIUMtools/fix_qwen2_5_vl_awq.py19 print("Error: lmdeploy is not installed in current environment")CODE
LOWtools/fix_qwen2_5_vl_awq.py28 except Exception as e:CODE
MEDIUMtools/fix_qwen2_5_vl_awq.py29 print(f"Error: Failed to read file - {e}")CODE
LOWtools/fix_qwen2_5_vl_awq.py57 except Exception as e:CODE
MEDIUMtools/fix_qwen2_5_vl_awq.py58 print(f"Error: Failed to write file - {e}")CODE
LOWtools/fix_qwen2_5_vl_awq.py74 except Exception as e:CODE
25 more matches not shown…
Cross-File Repetition15 hits · 75 pts
SeverityFileLineSnippetContext
HIGHmagic_pdf/operators/pipes_llm.py0apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any:STRING
HIGHmagic_pdf/operators/__init__.py0apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any:STRING
HIGHmagic_pdf/operators/models_llm.py0apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any:STRING
HIGHmagic_pdf/data/dataset.py0apply callable method which. args: proc (callable): invoke proc as follows: proc(dataset, *args, **kwargs) returns: any:STRING
HIGHmagic_pdf/data/data_reader_writer/filebase.py0read at offset and limit. args: path (str): the path of file, if the path is relative path, it will be joined with parenSTRING
HIGHmagic_pdf/data/io/s3.py0read at offset and limit. args: path (str): the path of file, if the path is relative path, it will be joined with parenSTRING
HIGHmagic_pdf/data/io/base.py0read at offset and limit. args: path (str): the path of file, if the path is relative path, it will be joined with parenSTRING
HIGHmagic_pdf/data/data_reader_writer/filebase.py0write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_diSTRING
HIGHmagic_pdf/data/io/http.py0write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_diSTRING
HIGHmagic_pdf/data/io/s3.py0write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_diSTRING
HIGHmagic_pdf/data/io/base.py0write file with data. args: path (str): the path of file, if the path is relative path, it will be joined with parent_diSTRING
HIGHmagic_pdf/data/data_reader_writer/base.py0read the file. args: path (str): file path to read returns: bytes: the content of the fileSTRING
HIGHmagic_pdf/data/io/http.py0read the file. args: path (str): file path to read returns: bytes: the content of the fileSTRING
HIGHmagic_pdf/data/io/s3.py0read the file. args: path (str): file path to read returns: bytes: the content of the fileSTRING
HIGHmagic_pdf/data/io/base.py0read the file. args: path (str): file path to read returns: bytes: the content of the fileSTRING
Deep Nesting67 hits · 62 pts
SeverityFileLineSnippetContext
LOWparse.py20CODE
LOWparse.py166CODE
LOWparse.py339CODE
LOWparse.py431CODE
LOWparse.py639CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py67CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py132CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py180CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py351CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py392CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py538CODE
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py565CODE
LOWmagic_pdf/post_proc/para_split_v3.py66CODE
LOWmagic_pdf/post_proc/para_split_v3.py254CODE
LOWmagic_pdf/post_proc/para_split_v3.py320CODE
LOWmagic_pdf/pre_proc/ocr_span_list_modify.py7CODE
LOWmagic_pdf/pre_proc/ocr_span_list_modify.py44CODE
LOWmagic_pdf/pre_proc/ocr_span_list_modify.py67CODE
LOWmagic_pdf/pre_proc/remove_bbox_overlap.py42CODE
LOWmagic_pdf/pre_proc/cut_image.py8CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py115CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py135CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py163CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py191CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py212CODE
LOWmagic_pdf/dict2md/ocr_mkcontent.py53CODE
LOWmagic_pdf/dict2md/ocr_mkcontent.py129CODE
LOWmagic_pdf/dict2md/ocr_mkcontent.py181CODE
LOWmagic_pdf/dict2md/ocr_mkcontent.py244CODE
LOWmagic_pdf/utils/load_image.py15CODE
LOWmagic_pdf/utils/load_image.py52CODE
LOWmagic_pdf/libs/draw_bbox.py71CODE
LOWmagic_pdf/libs/draw_bbox.py201CODE
LOWmagic_pdf/libs/draw_bbox.py289CODE
LOWmagic_pdf/libs/draw_bbox.py359CODE
LOWmagic_pdf/libs/draw_bbox.py409CODE
LOWmagic_pdf/libs/draw_bbox.py211CODE
LOWmagic_pdf/libs/boxbase.py356CODE
LOWmagic_pdf/model/batch_analyze_llm.py17CODE
LOWmagic_pdf/model/batch_analyze_llm.py171CODE
LOWmagic_pdf/model/doc_analyze_by_custom_model_llm.py12CODE
LOWmagic_pdf/model/custom_model.py23CODE
LOWmagic_pdf/model/custom_model.py320CODE
LOWmagic_pdf/model/custom_model.py621CODE
LOWmagic_pdf/model/custom_model.py972CODE
LOWmagic_pdf/model/magic_model.py78CODE
LOWmagic_pdf/model/magic_model.py142CODE
LOWmagic_pdf/model/magic_model.py215CODE
LOWmagic_pdf/model/magic_model.py543CODE
LOWmagic_pdf/model/magic_model.py596CODE
LOWmagic_pdf/model/sub_modules/model_utils.py27CODE
LOWmagic_pdf/filter/pdf_meta_scan.py60CODE
LOWmagic_pdf/filter/pdf_meta_scan.py178CODE
LOWmagic_pdf/filter/pdf_classify_by_type.py316CODE
LOWmagic_pdf/data/read_api.py53CODE
LOWmagic_pdf/data/read_api.py76CODE
LOWmagic_pdf/data/read_api.py119CODE
LOWmagic_pdf/data/dataset.py306CODE
LOWmagic_pdf/data/utils.py35CODE
LOWdemo/demo_gradio.py39CODE
7 more matches not shown…
Hyper-Verbose Identifiers45 hits · 45 pts
SeverityFileLineSnippetContext
LOWparse.py166def create_file_groups_by_page_count(file_paths, max_pages_per_group):CODE
LOWparse.py339def single_task_recognition_multi_file_group(file_paths, output_dir, MonkeyOCR_model, task, base_folder_path):CODE
LOWmagic_pdf/operators/pipes_llm.py173 def get_compress_pdf_mid_data(self):CODE
LOWmagic_pdf/pre_proc/ocr_span_list_modify.py7def remove_overlaps_low_confidence_spans(spans):CODE
LOWmagic_pdf/pre_proc/ocr_span_list_modify.py36def check_chars_is_overlap_in_span(chars):CODE
LOWmagic_pdf/pre_proc/ocr_span_list_modify.py44def remove_overlaps_min_spans(spans):CODE
LOWmagic_pdf/pre_proc/ocr_dict_merge.py6def line_sort_spans_by_left_to_right(lines):CODE
LOWmagic_pdf/pre_proc/remove_bbox_overlap.py5def _remove_overlap_between_bbox(bbox1, bbox2):CODE
LOWmagic_pdf/pre_proc/remove_bbox_overlap.py42def _remove_overlap_between_bboxes(arr):CODE
LOWmagic_pdf/pre_proc/remove_bbox_overlap.py79def remove_overlap_between_bbox_for_span(spans):CODE
LOWmagic_pdf/pre_proc/remove_bbox_overlap.py91def remove_overlap_between_bbox_for_block(all_bboxes):CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py115def find_blocks_under_footnote(all_bboxes, footnote_blocks):CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py135def fix_interline_equation_overlap_text_blocks_with_hi_iou(all_bboxes):CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py163def fix_text_overlap_title_blocks(all_bboxes):CODE
LOWmagic_pdf/pre_proc/ocr_detect_all_bboxes.py212def remove_overlaps_min_blocks(all_bboxes):CODE
LOWmagic_pdf/dict2md/ocr_mkcontent.py26def ocr_mk_mm_markdown_with_para_and_pagination(pdf_info_dict: list,CODE
LOWmagic_pdf/libs/config_reader.py14def get_current_file_parent_parent_dir():CODE
LOWmagic_pdf/libs/config_reader.py67def get_local_layoutreader_model_dir():CODE
LOWmagic_pdf/libs/pdf_check.py56def count_replacement_characters(text: str) -> int:CODE
LOWmagic_pdf/libs/pdf_check.py60def detect_invalid_chars_by_pymupdf(src_pdf_bytes: bytes) -> bool:CODE
LOWmagic_pdf/libs/markdown_utils.py2def ocr_escape_special_markdown_char(content):CODE
LOWmagic_pdf/libs/language.py15def remove_invalid_surrogates(text):CODE
LOWmagic_pdf/libs/boxbase.py17def _is_in_or_part_overlap_with_area_ratio(box1,CODE
LOWmagic_pdf/libs/boxbase.py81def _is_vertical_full_overlap(box1, box2, x_tolerance=2):CODE
LOWmagic_pdf/libs/boxbase.py136def __is_overlaps_y_exceeds_threshold(bbox1,CODE
LOWmagic_pdf/libs/boxbase.py216def get_minbox_if_overlap_by_ratio(bbox1, bbox2, ratio):CODE
LOWmagic_pdf/libs/boxbase.py247def find_top_nearest_text_bbox(pymu_blocks, obj_bbox):CODE
LOWmagic_pdf/libs/boxbase.py276def find_bottom_nearest_text_bbox(pymu_blocks, obj_bbox):CODE
LOWmagic_pdf/libs/boxbase.py299def find_left_nearest_text_bbox(pymu_blocks, obj_bbox):CODE
LOWmagic_pdf/libs/boxbase.py322def find_right_nearest_text_bbox(pymu_blocks, obj_bbox):CODE
LOWmagic_pdf/libs/boxbase.py404def calculate_vertical_projection_overlap_ratio(block1, block2):CODE
LOWmagic_pdf/model/magic_model.py66 def __fix_by_remove_low_confidence(self):CODE
LOWmagic_pdf/model/magic_model.py78 def __fix_by_remove_high_iou_and_low_confidence(self):CODE
LOWmagic_pdf/model/sub_modules/model_utils.py27def get_res_list_from_layout_res(layout_res):CODE
LOWmagic_pdf/model/sub_modules/model_init.py8def doclayout_yolo_model_init(weight, device='cpu'):CODE
LOWmagic_pdf/filter/pdf_meta_scan.py15def calculate_max_image_area_per_page(result: list, page_width_pts, page_height_pts):CODE
LOWmagic_pdf/filter/pdf_meta_scan.py178def get_pdf_text_layout_per_page(doc: fitz.Document):CODE
LOWmagic_pdf/filter/pdf_classify_by_type.py229def classify_by_img_narrow_strips(page_width, page_height, img_sz_list):CODE
LOWdemo/demo_gradio.py39def render_latex_table_to_image(latex_content, temp_dir):CODE
LOWdemo/demo_gradio.py142async def parse_pdf_and_return_results(pdf_file):STRING
LOWtools/fix_qwen2_5_vl_awq.py6def find_lmdeploy_calibrate_file():CODE
LOWapi/main.py202async def process_inference_results_async(infer_result, output_dir, name_without_suff,CODE
LOWapi/main.py237async def process_single_page_async(page_infer_result, page_idx, output_dir, name_without_suff, monkey_ocr_model):CODE
LOWapi/main.py285async def process_single_result_async(infer_result, name_without_suff, local_image_dir, local_md_dir, image_dir, monkey_CODE
LOWapi/main.py309async def async_single_task_recognition(input_file_path: str, output_dir: str, task: str):CODE
Redundant / Tautological Comments25 hits · 37 pts
SeverityFileLineSnippetContext
LOWparse.py35 # Check if folder existsCOMMENT
LOWparse.py194 # Check if adding this file would exceed the limitCOMMENT
LOWparse.py444 # Check if input file existsCOMMENT
LOWparse.py546 # Check if input file existsCOMMENT
LOWparse.py564 # Read file contentCOMMENT
LOWparse.py581 # Check if infer_result is a list typeCOMMENT
LOWparse.py742 # Check if input path is a directory or fileSTRING
LOWmagic_pdf/pdf_parse_union_core_v2_llm.py68 # Check if char in span is emptyCOMMENT
LOWmagic_pdf/model/batch_analyze_llm.py64 # Check if split_pages is True and handle pages without valid cidsCOMMENT
LOWmagic_pdf/model/batch_analyze_llm.py71 # Check if this page has any valid cidsCOMMENT
LOWmagic_pdf/model/custom_model.py706 # Add request to queueCOMMENT
LOWmagic_pdf/model/custom_model.py1068 # Add request to queueCOMMENT
LOWmagic_pdf/filter/pdf_classify_by_type.py75 # Check if the image can be merged with the last imageCOMMENT
LOWdemo/demo_gradio.py109 # Check if PDF file is generatedSTRING
LOWdemo/demo_gradio.py184 # Check if contains \begin{tabular}STRING
LOWtools/fix_qwen2_5_vl_awq.py24 # Read file contentCOMMENT
LOWtools/fix_qwen2_5_vl_awq.py32 # Check if already patchedCOMMENT
LOWtools/fix_qwen2_5_vl_awq.py67 # Check if backup existsCOMMENT
LOWtools/fix_qwen2_5_vl_awq.py86 # Check if file is in patched stateCOMMENT
LOWtools/lmdeploy_patcher.py116 # Read file contentCOMMENT
LOWtools/lmdeploy_patcher.py126 # Check if already modifiedCOMMENT
LOWdocker/download_models.sh26# Check if models already existCOMMENT
LOWdocker/download_models.sh84 # Check if download script existsCOMMENT
LOWapi/main.py155 # Read file content in thread poolCOMMENT
LOWapi/main.py214 # Check if infer_result is a list (split pages)COMMENT
Unused Imports18 hits · 17 pts
SeverityFileLineSnippetContext
LOWmagic_pdf/utils/annotations.py7CODE
LOWmagic_pdf/model/custom_model.py5CODE
LOW…del/sub_modules/layout/doclayout_yolo/DocLayoutYOLO.py2CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py1CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py3CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py5CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py7CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py9CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py10CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py11CODE
LOWmagic_pdf/data/data_reader_writer/__init__.py12CODE
LOWmagic_pdf/data/io/__init__.py2CODE
LOWmagic_pdf/data/io/__init__.py2CODE
LOWmagic_pdf/data/io/__init__.py3CODE
LOWmagic_pdf/data/io/__init__.py3CODE
LOWmagic_pdf/data/io/__init__.py4CODE
LOWmagic_pdf/data/io/__init__.py4CODE
LOWapi/main.py356CODE
Self-Referential Comments5 hits · 13 pts
SeverityFileLineSnippetContext
MEDIUMmagic_pdf/libs/draw_bbox.py17 rect_coords = fitz.Rect(x0, y0, x1, y1) * page.derotation_matrix # Define the rectangleCODE
MEDIUMmagic_pdf/libs/draw_bbox.py46 rect_coords = fitz.Rect(x0, y0, x1, y1) * page.derotation_matrix # Define the rectangleCODE
MEDIUMmagic_pdf/model/batch_analyze_llm.py92 # Create a single result covering the whole pageCOMMENT
MEDIUMmagic_pdf/model/sub_modules/model_utils.py13 # Create a white background with an additional width and height of 50COMMENT
MEDIUMmagic_pdf/data/dataset.py326 # Create a new PDF documentCOMMENT
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHmagic_pdf/data/read_api.py16Read the jsonl file and return the list of PymuDocDataset. Args: s3_path_or_local (str): local file or s3 pSTRING
HIGHmagic_pdf/data/read_api.py77Read ms-office file (ppt, pptx, doc, docx) from path or directory. Args: path (str): ms-office file or direSTRING
Over-Commented Block4 hits · 4 pts
SeverityFileLineSnippetContext
LOWmodel_configs.yaml21COMMENT
LOWmagic_pdf/filter/pdf_meta_scan.py221 # dir_value = line['dir']COMMENT
LOWmagic_pdf/filter/pdf_meta_scan.py361 # "D:/project/20231108code-clean/pdf_cost_time/scihub/scihub_18600000/libgen.scimag18645000-18645999.zip_10.1021/om3COMMENT
LOWmagic_pdf/filter/pdf_classify_by_type.py101COMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMmagic_pdf/pdf_parse_union_core_v2_llm.py131# Use more robust center point coordinate judgmentCOMMENT
AI Structural Patterns3 hits · 3 pts
SeverityFileLineSnippetContext
LOWmagic_pdf/operators/models_llm.py114CODE
LOWmagic_pdf/utils/load_image.py44CODE
LOWmagic_pdf/libs/json_compressor.py27CODE
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWmagic_pdf/data/io/__init__.py6__all__ = ['IOReader', 'IOWriter', 'HttpReader', 'HttpWriter', 'S3Reader', 'S3Writer']CODE