Repository Analysis

allenai/olmocr

Toolkit for linearizing PDFs for LLM datasets/training

29.4 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of allenai/olmocr, a Python project with 19,088 GitHub stars. SynthScan v2.0 examined 77,441 lines of code across 345 source files, recording 1470 pattern matches distributed across 21 syntactic categories. The overall adjusted score of 29.4 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).

29.4
Adjusted Score
29.4
Raw Score
100%
Time Factor
2026-03-25
Last Push
19.1K
Stars
Python
Language
77.4K
Lines of Code
345
Files
1.5K
Pattern Hits
2026-07-14
Scan Date
0.19
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 65MEDIUM 326LOW 1079

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 1470 distinct pattern matches across 21 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 Wrapping466 hits · 677 pts
SeverityFileLineSnippetContext
LOWtests/test_tests.py1578 except Exception as e:CODE
LOWtests/test_tests.py1600 except Exception as e:CODE
LOWtests/test_tests.py1612 except Exception as e:CODE
LOWtests/test_tests.py1625 except Exception as e:CODE
LOWtests/test_tests.py1645 except Exception as e:CODE
LOWtests/test_tests.py2214 except Exception as e:CODE
LOWolmocr/image_utils.py49 except Exception as e:CODE
MEDIUMolmocr/image_utils.py50 print(f"Error: {e}")CODE
LOWolmocr/image_utils.py59 except Exception as e:CODE
MEDIUMolmocr/image_utils.py60 print(f"Error: {e}")CODE
MEDIUMolmocr/image_utils.py44def is_png(file_path):CODE
MEDIUMolmocr/image_utils.py54def is_jpeg(file_path):CODE
LOWolmocr/s3_utils.py141 except Exception as e:CODE
LOWolmocr/s3_utils.py243 except Exception as e:CODE
LOWolmocr/s3_utils.py281 except Exception as e:CODE
LOWolmocr/s3_utils.py323 except Exception as e:CODE
LOWolmocr/s3_utils.py349 except Exception as e:CODE
MEDIUMolmocr/s3_utils.py277def download_blob(blob, local_file_path):CODE
MEDIUMolmocr/pipeline.py845def _kill_proc():CODE
MEDIUMolmocr/pipeline.py1115def process_output_file(s3_path):CODE
LOWolmocr/pipeline.py228 except Exception as e:CODE
LOWolmocr/pipeline.py466 except Exception as e:CODE
LOWolmocr/pipeline.py570 except Exception as e:CODE
LOWolmocr/pipeline.py803 except Exception as e:CODE
LOWolmocr/pipeline.py890 except Exception as ex:CODE
LOWolmocr/pipeline.py948 except Exception:CODE
LOWolmocr/pipeline.py974 except Exception:CODE
LOWolmocr/pipeline.py1149 except Exception as e:CODE
LOWolmocr/pipeline.py1395 except Exception as e:CODE
LOWolmocr/work_queue.py213 except Exception as e:CODE
LOWolmocr/bench/benchmark.py111 except Exception as e:CODE
LOWolmocr/bench/benchmark.py121 except Exception as e:CODE
MEDIUMolmocr/bench/benchmark.py203 print("Error: /pdfs folder must exist in your data directory.", file=sys.stderr)CODE
MEDIUMolmocr/bench/benchmark.py209 print(f"Error: No PDF files found in {pdf_folder}", file=sys.stderr)CODE
MEDIUMolmocr/bench/benchmark.py220 print(f"Error: No .jsonl files found in {input_folder}.", file=sys.stderr)CODE
MEDIUMolmocr/bench/benchmark.py275 print("Error: No candidate pipeline folders found (subdirectories besides 'pdfs').", file=sys.stderr)CODE
LOWolmocr/bench/convert.py84 except Exception as ex:CODE
LOWolmocr/bench/convert.py172 except Exception as e:CODE
LOWolmocr/bench/convert.py215 except Exception as e:CODE
LOWolmocr/bench/convert.py226 except Exception as e:CODE
MEDIUMolmocr/bench/review_app.py267 print(f"Error: Dataset not found: {args.dataset_file}")CODE
MEDIUMolmocr/bench/review_app.py276 print(f"Error: PDF directory not found: {pdf_dir}")CODE
LOWolmocr/bench/review_app.py282 except Exception as e:CODE
MEDIUMolmocr/bench/review_app.py283 print(f"Error loading dataset: {str(e)}")CODE
MEDIUMolmocr/bench/review_app_latex.py689 print(f"Error: Dataset not found: {args.dataset_file}")CODE
MEDIUMolmocr/bench/review_app_latex.py697 print(f"Error: PDF directory not found: {pdf_dir}")CODE
LOWolmocr/bench/review_app_latex.py702 except Exception as e:CODE
MEDIUMolmocr/bench/review_app_latex.py703 print(f"Error loading dataset: {str(e)}")CODE
MEDIUMolmocr/bench/tests.py834 print(f"Error parsing JSON on line {line_number}: {e}")CODE
MEDIUMolmocr/bench/tests.py837 print(f"Error on line {line_number}: {e}")CODE
LOWolmocr/bench/tests.py839 except Exception as e:CODE
LOWolmocr/bench/report.py267 except Exception as e:CODE
LOWolmocr/bench/report.py279 except Exception as e:CODE
LOWolmocr/bench/katex/render.py179 except Exception:CODE
LOWolmocr/bench/katex/render.py183 except Exception:CODE
LOWolmocr/bench/katex/render.py224 except Exception:CODE
MEDIUMolmocr/bench/katex/render.py304 print(f"Error rendering equation: '{equation}'")STRING
LOWolmocr/bench/katex/render.py431 except Exception as e:STRING
MEDIUMolmocr/bench/katex/render.py432 print("Error parsing MathML with BeautifulSoup:", e)STRING
LOWolmocr/bench/scripts/screen_pdfs.py93 except Exception as e:CODE
406 more matches not shown…
Self-Referential Comments119 hits · 346 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_mine_html_templates_mine_tests.py931 # Create a temporary file to store the rendered PDFSTRING
MEDIUMtests/test_tests.py570 # Create a table with irregular pipe placement at the endCOMMENT
MEDIUMtests/test_tests.py603 # Create a very long text before the tableCOMMENT
MEDIUMtests/test_grpo.py44 # Create a minimal valid PDFCOMMENT
MEDIUMtests/test_grpo.py189 # Create an empty JSONL fileCOMMENT
MEDIUMtests/test_grpo.py208 # Create a JSONL with some malformed entriesCOMMENT
MEDIUMtests/test_grpo.py275 # Create a sample JSONL test file with different test typesCOMMENT
MEDIUMtests/test_pipeline.py172 # Create a more complex test imageCOMMENT
MEDIUMolmocr/metrics.py159 # Create the table headerCOMMENT
MEDIUMolmocr/metrics.py163 # Create the table rowsCOMMENT
MEDIUMolmocr/pipeline.py691 # Create the output markdown pathCOMMENT
MEDIUMolmocr/pipeline.py750 # Define the output S3 path using the work_hashCOMMENT
MEDIUMolmocr/pipeline.py775 # Create the directory structure if it doesn't existCOMMENT
MEDIUMolmocr/pipeline.py1070 # Create the experiment specCOMMENT
MEDIUMolmocr/bench/benchmark.py79 # Define an inner function to evaluate a single testCOMMENT
MEDIUMolmocr/bench/review_app_latex.py248 # Create the review_latex.html template with MathJax supportCOMMENT
MEDIUMolmocr/bench/review_app_latex.py611 # Create the all_done_latex.html templateSTRING
MEDIUMolmocr/bench/katex/render.py243 # Create a new page.COMMENT
MEDIUMolmocr/bench/scripts/split_table_tests.py91 # Create a new test dict for each relationshipCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py93 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py34# Create a thread-safe lock for writing to output filesCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py343 # Create a thread-specific temp directory to avoid conflictsCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py442 # Create a summary fileCOMMENT
MEDIUMolmocr/bench/miners/mine_reading_order.py448 # Create a ThreadPoolExecutorCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gpt.py89 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py97 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py37# Create a thread-safe lock for writing to the output fileCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py238 # Create an image part from the rendered pdf imageCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py308 # Create a thread-specific temp directory to avoid conflictsCOMMENT
MEDIUMolmocr/bench/miners/mine_tables_gemini.py414 # Create a ThreadPoolExecutorCOMMENT
MEDIUMolmocr/bench/miners/mine_long_tiny_text.py57 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_long_tiny_text.py214 # Create a placeholder test to ensure the PDF is representedCOMMENT
MEDIUMolmocr/bench/miners/cleanup_data.py56 # Create a new single-page PDFCOMMENT
MEDIUMolmocr/bench/miners/cleanup_data.py93 # Create a dataset.jsonl with only the tests for pages we're keepingCOMMENT
MEDIUMolmocr/bench/miners/mine_headers_footers.py89 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/mine_old_scans_math.py57 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/bench/miners/pick_mediod.py141 # Create the output path, preserving the directory structure relative to input_dirCOMMENT
MEDIUMolmocr/bench/runners/run_mistral.py32 # Create a new PDF with just the requested pageCOMMENT
MEDIUMolmocr/bench/runners/run_mineru.py26 # Create a new PDF with just the requested pageCOMMENT
MEDIUMolmocr/bench/runners/run_marker.py17 # Create a configuration dictionary with the necessary settingsCOMMENT
MEDIUMolmocr/bench/runners/run_marker.py47 # Create a new PDF with just the requested pageCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py530 # Create a temporary PDF fileCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py670 # Create a new PDF with just the selected pageCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py224 # Create a temporary soup with just this element to get its HTMLCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py311 # Create a new soup with just the body contentCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py328 # Create an img tag with placeholder src and appropriate alt textCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py1825 # Create a unique folder for each PDF in the temp directory; include PID and PDF path hash to avoid cross-run collisCOMMENT
MEDIUMolmocr/synth/mine_html_templates.py972 # Create a TableTest with relevant relationshipsSTRING
MEDIUMolmocr/synth/mine_html_templates.py1016 # Create the actual test objectSTRING
MEDIUMolmocr/synth/mine_html_templates.py1441 # Create a format testSTRING
MEDIUMolmocr/synth/mine_html_templates.py1694 # Create a signature for the test by using all fields except 'id'STRING
MEDIUMolmocr/synth/mine_html_templates.py1717 # Create a baseline test object to check if disallowed characters are presentSTRING
MEDIUMolmocr/synth/rotate_html_templates.py54 # Create the same symlink in destinationCOMMENT
MEDIUMolmocr/synth/rotate_html_templates.py283 # Create a temporary file for the rotated PDFCOMMENT
MEDIUMolmocr/train/config.py330 # Create main configCOMMENT
MEDIUMolmocr/train/compress_checkpoint.py254# Define a oneshot data collator for multimodal inputs.COMMENT
MEDIUMolmocr/train/grpo_train.py1429 # Create a wrapper function that calls olmocr_bench_reward with macro_average=TrueCOMMENT
MEDIUMolmocr/train/grpo_train.py1474 # Create a wrapper function with proper __name__ attributeCOMMENT
MEDIUMolmocr/train/dataloader.py926 # Create a new PageResponse with the updated text (since it's frozen)COMMENT
MEDIUMolmocr/train/dataloader.py1075 # Create a new PageResponse with the updated text (since it's frozen)COMMENT
59 more matches not shown…
Hyper-Verbose Identifiers312 hits · 285 pts
SeverityFileLineSnippetContext
LOWtests/test_olmocrmix.py10def test_repackage_and_prepare_olmocrmix():CODE
LOWtests/test_s3_work_queue.py29 def test_compute_workgroup_hash(self):CODE
LOWtests/test_s3_work_queue.py73 async def test_populate_queue_new_items(self):CODE
LOWtests/test_s3_work_queue.py94 async def test_populate_queue_existing_items(self):CODE
LOWtests/test_mine_html_templates_markdown.py17 def test_title_tag_excluded_from_markdown(self):CODE
LOWtests/test_mine_html_templates_markdown.py44 def test_image_with_data_description(self):STRING
LOWtests/test_mine_html_templates_markdown.py65 def test_image_without_data_description(self):STRING
LOWtests/test_mine_html_templates_markdown.py80 def test_headers_footers_excluded(self):STRING
LOWtests/test_mine_html_templates_markdown.py109 def test_no_body_tag_fallback(self):STRING
LOWtests/test_mine_html_templates_markdown.py124 def test_removes_triple_dashes_from_content(self):STRING
LOWtests/test_mine_html_templates_markdown.py222 def test_mixed_super_and_subscripts(self):STRING
LOWtests/test_mine_html_templates_markdown.py314 def test_frontmatter_preserved(self):STRING
LOWtests/test_mine_html_templates_markdown.py351 def test_empty_super_subscripts(self):STRING
LOWtests/test_mine_html_templates_markdown.py369 def test_complex_math_expression(self):STRING
LOWtests/test_mine_html_templates_markdown.py391 def test_non_numerical_footnote(self):STRING
LOWtests/test_mine_html_templates_markdown.py406 def test_line_numbers_markdown(self):STRING
LOWtests/test_dataloader.py25 def test_markdown_table_detection(self):CODE
LOWtests/test_dataloader.py99 def test_malformed_html_table_unclosed_tags(self):STRING
LOWtests/test_dataloader.py128 def test_malformed_html_table_missing_closing(self):STRING
LOWtests/test_dataloader.py197 def test_complex_markdown_table_variations(self):CODE
LOWtests/test_dataloader.py247 def test_br_tags_outside_tables(self):STRING
LOWtests/test_dataloader.py277 def test_simple_bold_conversion(self):CODE
LOWtests/test_dataloader.py293 def test_simple_italic_conversion(self):CODE
LOWtests/test_dataloader.py309 def test_bold_and_italic_conversion(self):CODE
LOWtests/test_dataloader.py325 def test_latex_in_math_equation_preserved(self):CODE
LOWtests/test_dataloader.py373 def test_multiple_occurrences(self):CODE
LOWtests/test_dataloader.py389 def test_latex_in_parenthesis_delimiter(self):CODE
LOWtests/test_dataloader.py405 def test_latex_in_bracket_delimiter(self):CODE
LOWtests/test_dataloader.py460 def test_complex_latex_with_parenthesis_delimiters(self):CODE
LOWtests/test_dataloader.py536 def test_rotation_correction_needed(self):CODE
LOWtests/test_dataloader.py567 def test_dollar_to_parentheses(self):CODE
LOWtests/test_dataloader.py584 def test_double_dollar_to_brackets(self):CODE
LOWtests/test_dataloader.py601 def test_mixed_latex_delimiters(self):CODE
LOWtests/test_dataloader.py667 def test_parse_yaml_front_matter(self, mock_read_text):CODE
LOWtests/test_dataloader.py715 def test_preserve_existing_markdown_content(self, mock_read_text):STRING
LOWtests/test_mine_html_templates_mine_tests.py1044 def test_complex_markdown_formatting(self):CODE
LOWtests/test_mine_html_templates_mine_tests.py1104 def test_complex_formatting_two(self):STRING
LOWtests/test_mine_html_templates_footnotes.py46 def test_single_marker_generates_marker_only(self):CODE
LOWtests/test_mine_html_templates_footnotes.py71 def test_marker_with_definition_includes_text(self):STRING
LOWtests/test_mine_html_templates_footnotes.py99 def test_multiple_markers_mixed_occurrences(self):STRING
LOWtests/test_mine_html_templates_footnotes.py211 def test_footnotes_in_footer_ptags(self):STRING
LOWtests/test_mine_html_templates_footnotes.py314 def test_footnotes_footer_again(self):CODE
LOWtests/test_tests.py136 def test_present_text_exact_match(self):CODE
LOWtests/test_tests.py142 def test_present_text_not_found(self):CODE
LOWtests/test_tests.py149 def test_present_text_with_max_diffs(self):CODE
LOWtests/test_tests.py182 def test_absent_text_not_found(self):CODE
LOWtests/test_tests.py188 def test_case_insensitive_present(self):CODE
LOWtests/test_tests.py194 def test_case_insensitive_absent(self):CODE
LOWtests/test_tests.py526 def test_with_stripped_content(self):CODE
LOWtests/test_tests.py534 def test_table_at_end_of_file(self):CODE
LOWtests/test_tests.py542 def test_table_at_end_with_no_trailing_newline(self):CODE
LOWtests/test_tests.py550 def test_table_at_end_with_extra_spaces(self):CODE
LOWtests/test_tests.py559 def test_table_at_end_with_mixed_whitespace(self):CODE
LOWtests/test_tests.py567 def test_malformed_table_at_end(self):CODE
LOWtests/test_tests.py580 def test_incomplete_table_at_end(self):CODE
LOWtests/test_tests.py592 def test_table_with_excessive_blank_lines_at_end(self):CODE
LOWtests/test_tests.py600 def test_table_at_end_after_long_text(self):CODE
LOWtests/test_tests.py609 def test_valid_table_at_eof_without_newline(self):CODE
LOWtests/test_tests.py2077 def test_empty_appears_before_validation(self):CODE
LOWtests/test_tests.py2082 def test_empty_appears_after_validation(self):CODE
252 more matches not shown…
Redundant / Tautological Comments144 hits · 224 pts
SeverityFileLineSnippetContext
LOWtests/test_mine_html_templates_markdown.py288 # Check if tags are preserved in table cellsSTRING
LOWtests/test_mine_html_templates_mine_tests.py938 # Check if rendering was successfulSTRING
LOWolmocr/s3_utils.py76 # Check if it's actually a folder with contentsCOMMENT
LOWolmocr/pipeline.py1347 # Check if this is a tar.gz file (local)COMMENT
LOWolmocr/pipeline.py1410 # Add tarballs to the queue - each tarball is one work itemCOMMENT
LOWolmocr/bench/tests.py319 # Check if the text appears in any of the formatted texts using fuzzy matchingCOMMENT
LOWolmocr/bench/tests.py715 # Check if appears_before_marker is at the end of this text (using fuzzy matching)COMMENT
LOWolmocr/bench/tests.py741 # Check if appears_after_marker is at the beginning of this text (using fuzzy matching)COMMENT
LOWolmocr/bench/table_parsing.py284 # Check if this line has pipe characters (a table row indicator)COMMENT
LOWolmocr/bench/table_parsing.py359 # Check if this looks like a separator row (contains mostly dashes)COMMENT
LOWolmocr/bench/scripts/convert_all.sh121 # Check if environment existsCOMMENT
LOWolmocr/bench/scripts/convert_all.sh149 # Check if the server process is runningCOMMENT
LOWolmocr/bench/scripts/rotate_pdfs_random.sh6# Check if directory existsCOMMENT
LOWolmocr/bench/scripts/rotate_pdfs_random.sh12# Check if qpdf is installed (preferred for PDF rotation)COMMENT
LOWolmocr/bench/scripts/rotate_pdfs_random.sh28 # Check if any PDF files existCOMMENT
LOWolmocr/bench/miners/mine_reading_order.py88 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_reading_order.py470 # Check if we've reached the maximum number of documentsCOMMENT
LOWolmocr/bench/miners/mine_tables_gpt.py84 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_blank_pages_gpt.py119 # Check if natural_text is nullCOMMENT
LOWolmocr/bench/miners/mine_blank_pages_gpt.py172 # Check if the page has null natural_textCOMMENT
LOWolmocr/bench/miners/mine_tables_gemini.py92 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_tables_gemini.py432 # Check if we've reached the maximum number of testsCOMMENT
LOWolmocr/bench/miners/mine_multilingual_gpt.py169 # Check if the page contains a tableCOMMENT
LOWolmocr/bench/miners/mine_long_tiny_text.py52 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_headers_footers.py84 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/delete_rejected.py38 # Check if the test is marked as rejectedCOMMENT
LOWolmocr/bench/miners/delete_rejected.py95 # Check if all tests for this PDF are in the rejected listCOMMENT
LOWolmocr/bench/miners/mine_footnotes_gpt.py125 # Check if there are any footnotes in the listCOMMENT
LOWolmocr/bench/miners/mine_footnotes_gpt.py179 # Check if the page contains footnotesCOMMENT
LOWolmocr/bench/miners/mine_old_scans_math.py52 # Check if page number is validCOMMENT
LOWolmocr/bench/miners/mine_tables_gpt_simple.py200 # Check if the page contains a tableCOMMENT
LOWolmocr/bench/runners/run_mistral.py28 # Check if the requested page existsCOMMENT
LOWolmocr/bench/runners/run_mistral.py39 temp_file.close() # Close the file but keep the nameCODE
LOWolmocr/bench/runners/run_mineru.py22 # Check if the requested page existsCOMMENT
LOWolmocr/bench/runners/run_mineru.py33 temp_file.close() # Close the file but keep the nameCODE
LOWolmocr/bench/runners/run_marker.py43 # Check if the requested page existsCOMMENT
LOWolmocr/bench/runners/run_marker.py54 temp_file.close() # Close the file but keep the nameCODE
LOWolmocr/synth/mine_html_templates.py665 # Check if page number is validCOMMENT
LOWolmocr/synth/mine_html_templates.py157 # Check if it's a local pathCOMMENT
LOWolmocr/synth/mine_html_templates.py461 # Check if response was completeCOMMENT
LOWolmocr/synth/mine_html_templates.py508 # Check if response was completeCOMMENT
LOWolmocr/synth/mine_html_templates.py603 # Check if refinement response was completeCOMMENT
LOWolmocr/synth/mine_html_templates.py1866 # Check if this PDF has already been processed (skip logic for resume)COMMENT
LOWolmocr/synth/mine_html_templates.py885 # Check if this element has no children from our target tagsSTRING
LOWolmocr/synth/mine_html_templates.py1194 # Check if it's a numberSTRING
LOWolmocr/synth/mine_html_templates.py1198 # Check if it's a word (has at least one alphabetic character)STRING
LOWolmocr/synth/rotate_html_templates.py50 # Check if it's a symlinkCOMMENT
LOWolmocr/synth/rotate_html_templates.py117 # Check if file starts with FrontMatterCOMMENT
LOWolmocr/train/train.py119 # Check if we have any valid samplesCOMMENT
LOWolmocr/train/train.py654 # Check if we should do a gradient updateCOMMENT
LOWolmocr/train/train.py712 # Check if we've reached our training limitCOMMENT
LOWolmocr/train/dataloader.py439 # Check if line looks like a table rowCOMMENT
LOWolmocr/train/dataloader.py441 # Check if next line is a separator (for header rows)COMMENT
LOWolmocr/train/dataloader.py446 # Check if previous line is a separator (for data rows)COMMENT
LOWolmocr/train/dataloader.py662 # Check if there was an errorCOMMENT
LOWolmocr/train/dataloader.py683 # Check if there are any tables in the textCOMMENT
LOWolmocr/train/dataloader.py698 # Check if cell content contains <br> tags (any variation)COMMENT
LOWolmocr/train/dataloader.py713 # Check if there are any <table> tags at allCOMMENT
LOWolmocr/train/dataloader.py346 # Check if image existsCOMMENT
LOWolmocr/train/dataloader.py350 # Check if page_data exists (we need to update it)COMMENT
84 more matches not shown…
Cross-Language Confusion34 hits · 194 pts
SeverityFileLineSnippetContext
HIGHtests/test_mine_html_templates_markdown.py444<div class="line-text">unknown and undefined, so the present study aimed to investigate characteristics of the DHLA-</diCODE
HIGHolmocr/pipeline.py181 r"---\nprimary_language: (?:[a-z]{2}|null)\nis_rotation_valid: (?:True|False|true|false)\nrotation_correCODE
HIGHolmocr/bench/review_app_latex.py442 let pdfDoc = null;CODE
HIGHolmocr/bench/review_app_latex.py444 let canvas = null;CODE
HIGHolmocr/bench/katex/render.py290 return null;CODE
HIGHolmocr/bench/katex/render.py329 list.push({CODE
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py79 Optional[bool]: True if natural_text is null, False otherwise, None if detection failsSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py79 Optional[bool]: True if natural_text is null, False otherwise, None if detection failsSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py119 # Check if natural_text is nullCOMMENT
HIGHolmocr/synth/cutoff_detection.py61 if (child.nodeType === Node.TEXT_NODE && child.textContent.trim()) {CODE
HIGHolmocr/synth/cutoff_detection.py68 leaves.push(el);CODE
HIGHolmocr/synth/cutoff_detection.py83 if (rect.width <= 0 || rect.height <= 0) continue;CODE
HIGHolmocr/synth/cutoff_detection.py109 let clippingAncestorTag = null;CODE
HIGHolmocr/synth/cutoff_detection.py123 if (clipsX || clipsY) {CODE
HIGHolmocr/synth/cutoff_detection.py142 (visLeft !== prevLeft || visTop !== prevTop ||CODE
HIGHolmocr/synth/cutoff_detection.py143 visRight !== prevRight || visBottom !== prevBottom)) {CODE
HIGHolmocr/synth/cutoff_detection.py166 results.push({CODE
HIGHolmocr/synth/cutoff_detection.py200 if (child.nodeType === Node.TEXT_NODE && child.textContent.trim()) {CODE
HIGHolmocr/synth/cutoff_detection.py205 if (hasDirectText) leaves.push(el);CODE
HIGHolmocr/synth/cutoff_detection.py221 if (!bgColor || bgColor === 'rgba(0, 0, 0, 0)' || bgColor === 'transparent') return 0;CODE
HIGHolmocr/synth/cutoff_detection.py231 if (rect.width <= 0 || rect.height <= 0) continue;CODE
HIGHolmocr/synth/cutoff_detection.py238 if (!directText || directText.length < 3) continue;CODE
HIGHolmocr/synth/cutoff_detection.py246 let blockerTag = null;CODE
HIGHolmocr/synth/cutoff_detection.py252 if (px < 0 || py < 0) continue;CODE
HIGHolmocr/synth/cutoff_detection.py256 if (topEl === el || isRelated(topEl, el)) continue;CODE
HIGHolmocr/synth/cutoff_detection.py269 results.push({CODE
HIGHscripts/scan_dolmadocs.py1160 const primaryOption = activePrimaryButton ? activePrimaryButton.getAttribute('data-value') : null;CODE
HIGHscripts/scan_dolmadocs.py1165 publicPiiOptions.push(checkbox.getAttribute('data-value'));CODE
HIGHscripts/scan_dolmadocs.py1171 privatePiiOptions.push(checkbox.getAttribute('data-value'));CODE
HIGHscripts/scan_dolmadocs.py1058 status.onclick = null;CODE
HIGHscripts/scan_dolmadocs.py1343 if (data.publicPiiOptions && data.publicPiiOptions.length > 0) {CODE
HIGHscripts/scan_dolmadocs.py1357 if (data.privatePiiOptions && data.privatePiiOptions.length > 0) {CODE
HIGHscripts/scan_dolmadocs.py1528 if (event.target && event.target.id === 'start-button') {CODE
HIGHscripts/scan_dolmadocs.py1539 if (event.target && event.target.id === 'view-instructions-button') {CODE
Deep Nesting178 hits · 153 pts
SeverityFileLineSnippetContext
LOWtests/test_s3_work_queue.py224CODE
LOWtests/test_integration.py11CODE
LOWolmocr/s3_utils.py36CODE
LOWolmocr/s3_utils.py199CODE
LOWolmocr/s3_utils.py250CODE
LOWolmocr/s3_utils.py378CODE
LOWolmocr/pipeline.py106CODE
LOWolmocr/pipeline.py281CODE
LOWolmocr/pipeline.py382CODE
LOWolmocr/pipeline.py485CODE
LOWolmocr/pipeline.py698CODE
LOWolmocr/pipeline.py956CODE
LOWolmocr/pipeline.py1199CODE
LOWolmocr/bench/benchmark.py162CODE
LOWolmocr/bench/convert.py19CODE
LOWolmocr/bench/convert.py103CODE
LOWolmocr/bench/review_app.py38CODE
LOWolmocr/bench/review_app.py219CODE
LOWolmocr/bench/review_app_latex.py36CODE
LOWolmocr/bench/review_app_latex.py217CODE
LOWolmocr/bench/utils.py6CODE
LOWolmocr/bench/tests.py766CODE
LOWolmocr/bench/tests.py253CODE
LOWolmocr/bench/tests.py376CODE
LOWolmocr/bench/tests.py655CODE
LOWolmocr/bench/table_parsing.py83CODE
LOWolmocr/bench/table_parsing.py263CODE
LOWolmocr/bench/table_parsing.py390CODE
LOWolmocr/bench/report.py12CODE
LOWolmocr/bench/report.py42CODE
LOWolmocr/bench/katex/render.py414CODE
LOWolmocr/bench/katex/render.py475CODE
LOWolmocr/bench/katex/render.py517CODE
LOWolmocr/bench/scripts/workspace_to_bench.py25CODE
LOWolmocr/bench/scripts/difference_viewer.py15CODE
LOWolmocr/bench/scripts/difference_viewer.py64CODE
LOWolmocr/bench/scripts/url_matcher.py10CODE
LOWolmocr/bench/scripts/url_matcher.py29CODE
LOWolmocr/bench/scripts/rotate_pdfs.py10CODE
LOWolmocr/bench/miners/mine_reading_order.py330CODE
LOWolmocr/bench/miners/mine_reading_order.py426CODE
LOWolmocr/bench/miners/mine_reading_order.py483CODE
LOWolmocr/bench/miners/mine_tables_gpt.py189CODE
LOWolmocr/bench/miners/mine_diffs.py90CODE
LOWolmocr/bench/miners/mine_multi_column.py181CODE
LOWolmocr/bench/miners/mine_multi_column.py330CODE
LOWolmocr/bench/miners/mine_blank_pages_gpt.py204CODE
LOWolmocr/bench/miners/mine_tables_gemini.py205CODE
LOWolmocr/bench/miners/mine_tables_gemini.py398CODE
LOWolmocr/bench/miners/mine_tables_gemini.py445CODE
LOWolmocr/bench/miners/mine_old_scan_pdf.py9CODE
LOWolmocr/bench/miners/mine_multilingual_gpt.py201CODE
LOWolmocr/bench/miners/mine_long_tiny_text.py151CODE
LOWolmocr/bench/miners/cleanup_data.py10CODE
LOWolmocr/bench/miners/cleanup_data.py89CODE
LOWolmocr/bench/miners/delete_rejected.py10CODE
LOWolmocr/bench/miners/delete_rejected.py53CODE
LOWolmocr/bench/miners/mine_math.py84CODE
LOWolmocr/bench/miners/check_old_scans_math.py86CODE
LOWolmocr/bench/miners/mine_footnotes_gpt.py211CODE
118 more matches not shown…
Cross-File Repetition26 hits · 130 pts
SeverityFileLineSnippetContext
HIGHolmocr/bench/miners/mine_reading_order.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_tables_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_tables_gemini.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_multilingual_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_headers_footers.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_footnotes_gpt.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_length_gpt_simple.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_tables_gpt_simple.py0download a pdf file from s3. args: s3_path: the s3 path (s3://bucket/path/to/file.pdf) local_path: the local path to savSTRING
HIGHolmocr/bench/miners/mine_reading_order.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_tables_gpt.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_tables_gemini.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_long_tiny_text.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_headers_footers.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_old_scans_math.py0extract a specific page from a pdf and save it as a new pdf. args: input_path: path to the input pdf output_path: path tSTRING
HIGHolmocr/bench/miners/mine_blank_pages_gpt.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_multilingual_gpt.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_tables_gpt_simple.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_footnotes_gpt.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/miners/mine_length_gpt_simple.py0process a single pdf from s3. args: s3_path: s3 path to the pdf temp_dir: directory for temporary files output_dir: direSTRING
HIGHolmocr/bench/runners/run_transformers.py0convert page of a pdf file to markdown by calling a request running against an openai compatible server. you can use thiSTRING
HIGHolmocr/bench/runners/run_nanonetsocr_2.py0convert page of a pdf file to markdown by calling a request running against an openai compatible server. you can use thiSTRING
HIGHolmocr/bench/runners/run_server.py0convert page of a pdf file to markdown by calling a request running against an openai compatible server. you can use thiSTRING
HIGHscripts/pii/rich_tagging_pipeline.py0you are a document analyzer that identifies personally identifiable information (pii) in documents. your task is to analSTRING
HIGHscripts/pii/autoscan_dolmadocs.py0you are a document analyzer that identifies personally identifiable information (pii) in documents. your task is to analSTRING
HIGHscripts/pii/chatgpt_tag_dolmadocs_v1.py0you are a document analyzer that identifies personally identifiable information (pii) in documents. your task is to analSTRING
Unused Imports60 hits · 59 pts
SeverityFileLineSnippetContext
LOWtests/test_mine_html_templates_markdown.py1CODE
LOWtests/test_mine_html_templates_markdown.py3CODE
LOWtests/test_mine_html_templates_markdown.py3CODE
LOWtests/test_mine_html_templates_markdown.py5CODE
LOWtests/test_mine_html_templates_markdown.py7CODE
LOWtests/test_mine_html_templates_markdown.py8CODE
LOWtests/test_mine_html_templates_markdown.py8CODE
LOWtests/test_mine_html_templates_markdown.py8CODE
LOWtests/test_dataloader.py6CODE
LOWtests/test_mine_html_templates_mine_tests.py3CODE
LOWtests/test_mine_html_templates_mine_tests.py3CODE
LOWtests/test_mine_html_templates_mine_tests.py5CODE
LOWtests/test_mine_html_templates_mine_tests.py7CODE
LOWtests/test_mine_html_templates_mine_tests.py8CODE
LOWtests/test_mine_html_templates_mine_tests.py8CODE
LOWtests/test_filter.py4CODE
LOWtests/test_cutoff_detection.py6CODE
LOWtests/test_mine_html_templates_metadata.py1CODE
LOWtests/test_mine_html_templates_metadata.py3CODE
LOWtests/test_mine_html_templates_metadata.py3CODE
LOWtests/test_mine_html_templates_metadata.py5CODE
LOWtests/test_mine_html_templates_metadata.py7CODE
LOWtests/test_mine_html_templates_metadata.py8CODE
LOWtests/test_mine_html_templates_metadata.py8CODE
LOWtests/test_mine_html_templates_metadata.py8CODE
LOWtests/test_grpo.py13CODE
LOWtests/test_anchor.py16CODE
LOWtests/test_anchor.py17CODE
LOWtests/test_anchor.py69CODE
LOWtests/test_anchor.py70CODE
LOWtests/test_mine_html_templates_formatting.py3CODE
LOWtests/test_mine_html_templates_formatting.py3CODE
LOWtests/test_mine_html_templates_formatting.py5CODE
LOWtests/test_mine_html_templates_formatting.py7CODE
LOWtests/test_mine_html_templates_formatting.py8CODE
LOWtests/test_mine_html_templates_formatting.py8CODE
LOWtests/test_table_parsing.py3CODE
LOWtests/test_mine_html_templates_incomplete_content.py5CODE
LOWtests/test_mine_html_templates_incomplete_content.py5CODE
LOWtests/test_mine_html_templates_incomplete_content.py7CODE
LOWtests/test_mine_html_templates_incomplete_content.py9CODE
LOWtests/test_mine_html_templates_introduce_text_errors.py4CODE
LOWtests/test_mine_html_templates_math_extraction.py5CODE
LOWtests/test_mine_html_templates_math_extraction.py7CODE
LOWtests/test_mine_html_templates_math_extraction.py8CODE
LOWtests/test_mine_html_templates_math_extraction.py8CODE
LOWtests/test_mine_html_templates_math_extraction.py8CODE
LOWolmocr/__init__.py1CODE
LOWolmocr/__init__.py1CODE
LOWolmocr/bench/katex/__init__.py1CODE
LOWolmocr/bench/katex/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/prompts/__init__.py1CODE
LOWolmocr/filter/__init__.py1CODE
LOWolmocr/data/repackage_olmocrmix.py12CODE
Verbosity Indicators31 hits · 50 pts
SeverityFileLineSnippetContext
LOWtests/test_olmocrmix.py17 # Step 1: Repackage the sample dataset into parquet + tarballsCOMMENT
LOWtests/test_olmocrmix.py44 # Step 2: Repackage the sample dataset into parquet + tarballsCOMMENT
LOWolmocr/bench/scripts/url_matcher.py35 # Step 1: Get all local JSONL filesCOMMENT
LOWolmocr/bench/scripts/url_matcher.py39 # Step 2: Extract URLs from local filesCOMMENT
LOWolmocr/bench/scripts/url_matcher.py58 # Step 3: Load Hugging Face datasetCOMMENT
LOWolmocr/bench/scripts/url_matcher.py64 # Step 4: Extract URLs from Hugging Face datasetCOMMENT
LOWolmocr/bench/scripts/url_matcher.py79 # Step 5: Find matchesCOMMENT
LOWolmocr/bench/scripts/url_matcher.py82 # Step 6: Group matches by local file with metadataCOMMENT
LOWolmocr/synth/mine_html_templates.py529 # Step 3: Render the initial HTML to PDF and then back to PNG for comparisonCOMMENT
LOWolmocr/synth/mine_html_templates.py390 # Step 0: Check that the orientation of the original document is right-side-up. If not, we willCOMMENT
LOWolmocr/synth/mine_html_templates.py436 # Step 1: Initial analysis and column detectionCOMMENT
LOWolmocr/synth/mine_html_templates.py476 # Step 2: Initial HTML generation with detailed layout instructionsCOMMENT
LOWolmocr/synth/mine_html_templates.py562 # Step 4: Refinement - Show both images to Claude and ask for correctionsCOMMENT
LOWolmocr/synth/mine_html_templates.py861 # Step 1: Process headers, footers, and page numbers for TextAbsenceTestsSTRING
LOWolmocr/synth/mine_html_templates.py1476 # Step 6: Generate FootnoteTests for footnotes on the pageSTRING
LOWolmocr/synth/mine_html_templates.py943 # Step 2: Generate tests from tables using parse_html_tablesSTRING
LOWolmocr/synth/mine_html_templates.py1054 # Step 3: Generate TextPresenceTests and OrderingTests from markdown contentSTRING
LOWolmocr/synth/mine_html_templates.py1368 # Step 4: Generate Math tests for LaTeX equations from the markdownSTRING
LOWolmocr/synth/mine_html_templates.py1409 # Step 5: Generate FormatTests for headings, bold, and italic textSTRING
LOWolmocr/synth/rotate_html_templates.py234 # Step 1: Copy entire directory structureCOMMENT
LOWolmocr/synth/rotate_html_templates.py241 # Step 2: Find all PDFs in the destination bench_data/pdfs directoryCOMMENT
LOWolmocr/synth/rotate_html_templates.py262 # Step 3: Select PDFs to rotate based on percentageCOMMENT
LOWolmocr/synth/rotate_html_templates.py271 # Step 4: Rotate selected PDFs and update corresponding markdown filesCOMMENT
LOWolmocr/data/prepare_olmocrmix.py148 # Step 1: Download dataset using hugging face hub snapshot_download to destination/hugging_face folderCOMMENT
LOWolmocr/data/prepare_olmocrmix.py197 # Step 2: Create destination folder structure for processed markdown filesCOMMENT
LOWolmocr/data/prepare_olmocrmix.py216 # Step 3: Extract PDF tarballsCOMMENT
LOWolmocr/data/prepare_olmocrmix.py265 # Step 4: Process parquet filesCOMMENT
LOWscripts/check_contamination.py197 # Step 1: Get all URLs from bench dataCOMMENT
LOWscripts/check_contamination.py202 # Step 2: Read metadata JSONL and process source URLsCOMMENT
LOWscripts/check_contamination.py216 # Step 3: Map URLs to hashes and query databaseCOMMENT
LOWscripts/check_contamination.py285 # Step 4: Check for contaminationCOMMENT
Structural Annotation Overuse31 hits · 50 pts
SeverityFileLineSnippetContext
LOWtests/test_olmocrmix.py17 # Step 1: Repackage the sample dataset into parquet + tarballsCOMMENT
LOWtests/test_olmocrmix.py44 # Step 2: Repackage the sample dataset into parquet + tarballsCOMMENT
LOWolmocr/bench/scripts/url_matcher.py35 # Step 1: Get all local JSONL filesCOMMENT
LOWolmocr/bench/scripts/url_matcher.py39 # Step 2: Extract URLs from local filesCOMMENT
LOWolmocr/bench/scripts/url_matcher.py58 # Step 3: Load Hugging Face datasetCOMMENT
LOWolmocr/bench/scripts/url_matcher.py64 # Step 4: Extract URLs from Hugging Face datasetCOMMENT
LOWolmocr/bench/scripts/url_matcher.py79 # Step 5: Find matchesCOMMENT
LOWolmocr/bench/scripts/url_matcher.py82 # Step 6: Group matches by local file with metadataCOMMENT
LOWolmocr/synth/mine_html_templates.py529 # Step 3: Render the initial HTML to PDF and then back to PNG for comparisonCOMMENT
LOWolmocr/synth/mine_html_templates.py390 # Step 0: Check that the orientation of the original document is right-side-up. If not, we willCOMMENT
LOWolmocr/synth/mine_html_templates.py436 # Step 1: Initial analysis and column detectionCOMMENT
LOWolmocr/synth/mine_html_templates.py476 # Step 2: Initial HTML generation with detailed layout instructionsCOMMENT
LOWolmocr/synth/mine_html_templates.py562 # Step 4: Refinement - Show both images to Claude and ask for correctionsCOMMENT
LOWolmocr/synth/mine_html_templates.py861 # Step 1: Process headers, footers, and page numbers for TextAbsenceTestsSTRING
LOWolmocr/synth/mine_html_templates.py1476 # Step 6: Generate FootnoteTests for footnotes on the pageSTRING
LOWolmocr/synth/mine_html_templates.py943 # Step 2: Generate tests from tables using parse_html_tablesSTRING
LOWolmocr/synth/mine_html_templates.py1054 # Step 3: Generate TextPresenceTests and OrderingTests from markdown contentSTRING
LOWolmocr/synth/mine_html_templates.py1368 # Step 4: Generate Math tests for LaTeX equations from the markdownSTRING
LOWolmocr/synth/mine_html_templates.py1409 # Step 5: Generate FormatTests for headings, bold, and italic textSTRING
LOWolmocr/synth/rotate_html_templates.py234 # Step 1: Copy entire directory structureCOMMENT
LOWolmocr/synth/rotate_html_templates.py241 # Step 2: Find all PDFs in the destination bench_data/pdfs directoryCOMMENT
LOWolmocr/synth/rotate_html_templates.py262 # Step 3: Select PDFs to rotate based on percentageCOMMENT
LOWolmocr/synth/rotate_html_templates.py271 # Step 4: Rotate selected PDFs and update corresponding markdown filesCOMMENT
LOWolmocr/data/prepare_olmocrmix.py148 # Step 1: Download dataset using hugging face hub snapshot_download to destination/hugging_face folderCOMMENT
LOWolmocr/data/prepare_olmocrmix.py197 # Step 2: Create destination folder structure for processed markdown filesCOMMENT
LOWolmocr/data/prepare_olmocrmix.py216 # Step 3: Extract PDF tarballsCOMMENT
LOWolmocr/data/prepare_olmocrmix.py265 # Step 4: Process parquet filesCOMMENT
LOWscripts/check_contamination.py197 # Step 1: Get all URLs from bench dataCOMMENT
LOWscripts/check_contamination.py202 # Step 2: Read metadata JSONL and process source URLsCOMMENT
LOWscripts/check_contamination.py216 # Step 3: Map URLs to hashes and query databaseCOMMENT
LOWscripts/check_contamination.py285 # Step 4: Check for contaminationCOMMENT
Over-Commented Block23 hits · 21 pts
SeverityFileLineSnippetContext
LOWolmocr/bench/scripts/convert_all.sh221# Run raw server benchmarks with generic server functionCOMMENT
LOWolmocr/bench/scripts/convert_all.sh241COMMENT
LOWolmocr/synth/mine_html_templates.py1281 # Run the test against the markdown contentCOMMENT
LOWolmocr/synth/mine_html_templates.py1301COMMENT
LOWolmocr/synth/mine_html_templates.py1321 # # Calculate similarity scores for each absent wordCOMMENT
LOWolmocr/synth/mine_html_templates.py1341COMMENT
LOW…igs/v0.5.0/qwen3_vl_olmocrv5_1epoch_mix_1025_mini.yaml61 # - name: processed_00_documents_eval_s2pdfCOMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py1# This script prepares transcriptions from the National Archives into a format usable by olmOCRCOMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py21# "objectFileSize": 9496446,COMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py41# "userId": "dff3eed0-38e5-35fc-b7e7-d2d58b023262",COMMENT
LOWolmocr/data/prepare_national_archive_transcripts.py61# }COMMENT
LOWscripts/remove_paths_from_olmocrmix.py1# This code takes in a path to an olmocr-mix processed data folderCOMMENT
LOWscripts/run_transformers_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_server_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/check_contamination.py1#!/usr/bin/env python3COMMENT
LOWscripts/run_dots_mocr_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_api_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_mineru_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_qianfan_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_infrapartner_benchmark.sh1#!/bin/bashCOMMENT
LOWscripts/run_chandra_benchmark.sh1#!/bin/bashCOMMENT
LOW.github/workflows/main.yml301 # with:COMMENT
Docstring Block Structure4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHolmocr/image_utils.py7 Convert one or multiple image files to PDF bytes. Args: image_files: A single image file path (str) orSTRING
HIGHolmocr/bench/tests.py767 Load a single test from a JSON line string or JSON object. Args: data: Either a JSON string to parse oSTRING
HIGHolmocr/data/renderpdf.py74 Returns the (width, height) of a PNG image given its base64-encoded data, without base64-decoding the entire daSTRING
HIGHscripts/pii/pii_rule_comparison.py1411 Generate HTML section with CDF plots for all numeric attributes. Args: numeric_attributes: Dictionary STRING
Modern Structural Boilerplate18 hits · 18 pts
SeverityFileLineSnippetContext
LOWolmocr/check.py6logger = logging.getLogger(__name__)CODE
LOWolmocr/s3_utils.py22logger = logging.getLogger(__name__)CODE
LOWolmocr/pipeline.py55logger = logging.getLogger(__name__)CODE
LOWolmocr/work_queue.py23logger = logging.getLogger(__name__)CODE
LOWolmocr/bench/runners/run_gemini.py24logger = logging.getLogger(__name__)CODE
LOWolmocr/bench/runners/run_chatgpt.py28logger = logging.getLogger(__name__)CODE
LOWolmocr/train/front_matter.py18logger = logging.getLogger(__name__)CODE
LOWolmocr/train/train.py37logger = logging.getLogger(__name__)CODE
LOWolmocr/train/grpo_train.py46logger = logging.getLogger(__name__)CODE
LOWolmocr/train/dataloader.py39logger = logging.getLogger(__name__)CODE
LOWolmocr/train/compare_vllm_checkpoint.py28logger = logging.getLogger(__name__)CODE
LOWolmocr/filter/filter.py10logger = logging.getLogger(__name__)CODE
LOWolmocr/data/prepare_workspace.py29logger = logging.getLogger(__name__)CODE
LOWscripts/pii/rich_tagging_pipeline.py42logger = logging.getLogger(__name__)CODE
LOWscripts/pii/pii_rule_comparison.py59logger = logging.getLogger(__name__)CODE
LOWscripts/pii/chatgpt_tag_dolmadocs_v1.py32logger = logging.getLogger(__name__)CODE
LOWscripts/pii/chatgpt_tag_dolmadocs_v2.py32logger = logging.getLogger(__name__)CODE
LOWscripts/pii/tagging_pipeline.py42logger = logging.getLogger(__name__)CODE
Slop Phrases6 hits · 12 pts
SeverityFileLineSnippetContext
LOWolmocr/pipeline.py470 # But just make sure to close the socket on your way outCOMMENT
MEDIUMolmocr/data/buildsilver.py39 # Ask for logprobs, it's not any more expensive and you can use them later to help identify problematic responsesCOMMENT
LOWscripts/pii/rich_tagging_pipeline.py301 # But just make sure to close the socket on your way outSTRING
LOWscripts/pii/tagging_pipeline.py227 # But just make sure to close the socket on your way outCOMMENT
MEDIUMscripts/data/buildsilver.py39 # Ask for logprobs, it's not any more expensive and you can use them later to help identify problematic responsesCOMMENT
MEDIUM.github/workflows/main.yml298 # jakep: (you can try by setting load: true above, but you'll need a larger runner)COMMENT
Example Usage Blocks6 hits · 10 pts
SeverityFileLineSnippetContext
LOWolmocr/bench/runners/run_olmocr_pipeline.py100 # Example usageCOMMENT
LOWscripts/run_dots_mocr_benchmark.sh5# Usage:COMMENT
LOWscripts/jsonl_to_markdown.py40# Example usageCOMMENT
LOWscripts/run_qianfan_benchmark.sh8# Usage:COMMENT
LOWscripts/run_chandra_benchmark.sh4# Usage:COMMENT
LOWscripts/eval/scoreelo.py288 # Example usageCOMMENT
Modern AI Meta-Vocabulary3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMolmocr/data/buildsilver.py37 # Also, structured outputs let you cheat, because the order in which fields are in your schema, is the order in whicCOMMENT
MEDIUMscripts/data/buildsilver.py37 # Also, structured outputs let you cheat, because the order in which fields are in your schema, is the order in whicCOMMENT
MEDIUMscripts/plots/plot_olmocr2_timeline.py210 # "descriptor": "Fixing bug with blank page hallucinations",COMMENT
Decorative Section Separators4 hits · 8 pts
SeverityFileLineSnippetContext
MEDIUMscripts/pii/rich_tagging_pipeline.py511 # ------------------------------------------------------------------STRING
MEDIUMscripts/pii/rich_tagging_pipeline.py513 # ------------------------------------------------------------------STRING
MEDIUMscripts/pii/tagging_pipeline.py346 # ------------------------------------------------------------------COMMENT
MEDIUMscripts/pii/tagging_pipeline.py348 # ------------------------------------------------------------------COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHolmocr/data/prepare_national_archive_transcripts.py246 # Skip if AI generated tagsCOMMENT
Fake / Example Data2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtests/test_tests.py604 long_text = "Lorem ipsum dolor sit amet, " * 100CODE
LOWtests/test_tests.py604 long_text = "Lorem ipsum dolor sit amet, " * 100CODE
Overly Generic Function Names1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/test_mine_html_templates_introduce_text_errors.py194 <script>function doSomething() { return value; }</script>CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWolmocr/bench/runners/run_dotsocr.py147CODE