Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions big_description.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"use_llm": true,
"llm_service": "gemini",
"gemini_api_key": "",
"gemini_model_name": "gemini-2.5-flash",
"output_format": "markdown",
"format_lines": true,
"max_retries": 5,
"retry_wait_time": 10,
"timeout": 120,
"debug": true,
"block_correction_prompt": "Fix table structure by identifying and consolidating rows that belong to the same line item. Look for rows that have empty quantity, rate, and amount columns but contain descriptive text - these are likely continuation rows that should be merged with the nearest row that has actual values. When merging, combine all related descriptive content in the description column using line breaks. CRITICAL: Be careful not to merge unrelated items that are outside the table - only merge rows that logically belong together as part of the same service or product description. Each final row should represent one billable line item with complete quantity, rate, and amount information."
}
11 changes: 11 additions & 0 deletions marker/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ def get_processors(self):
except Exception as e:
logger.error(f"Error loading processor: {p} with error: {e}")
raise
else:
# Check JSON config for processors
config = self.generate_config_dict()
processors = config.get("processors", None)
if processors is not None:
for p in processors:
try:
strings_to_classes([p])
except Exception as e:
logger.error(f"Error loading processor: {p} with error: {e}")
raise

return processors

Expand Down
Loading