Skip to content

Commit 327b3fa

Browse files
Martinclaude
andcommitted
docs(backlog): mark insert_markers feature as implemented
Update OCR_BACKLOG.md to reflect that insert_markers feature has been implemented in v1.4.0 (commits 6b1778e, ee633b4): - Move feature from "High Priority" backlog to "✅ Implemented" section - Add to Update Summary (2025-12-22) - Mark "Feature Request" section as completed - Document Option A (inline markers) as IMPLEMENTED - Document Option B (content map) as NOT IMPLEMENTED 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 320ecf1 commit 327b3fa

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

OCR_BACKLOG.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
- ✅ JSON cache files stored alongside PDFs (`{basename}_ocr.json`)
1111
- ✅ Fingerprint validation to detect PDF changes
1212
- ✅ Supports both page and image OCR caching
13+
-**Implemented insert_markers feature** for content type detection
14+
- ✅ Inline markers: `[IMAGE n: WxHpx, format]` and `[TABLE DETECTED]`
15+
- ✅ Helps clients identify pages needing OCR in large documents
1316

1417
## 🆕 Update Summary (2025-12-21)
1518
- ✅ Verified against current Mistral API documentation
@@ -49,6 +52,11 @@
4952
- Mock provider for testing
5053
- Vex schema validation for provider config
5154
- Cache management tools (`pdf_cache_stats`, `pdf_cache_clear`)
55+
- **Content markers in text extraction** (v1.4.0):
56+
- `insert_markers` parameter in `pdf_read_pages`
57+
- Inline markers: `[IMAGE n: WxHpx, format]`, `[TABLE DETECTED: n cols × m rows]`
58+
- Helps identify pages with complex content needing OCR
59+
- Code: `src/pdf/extractor.ts`, `src/pdf/text.ts`, `src/handlers/readPages.ts`
5260

5361
### 💾 Disk Cache Implementation
5462

@@ -219,16 +227,6 @@ chat_response = client.chat.complete(
219227

220228
### High Priority
221229

222-
- [ ] **Add content markers to text extraction** 🆕
223-
- Insert `[IMAGE n]` and `[TABLE DETECTED]` markers in extracted text
224-
- Helps clients decide when OCR is needed (scanned pages, complex layouts)
225-
- Use case: 800-page PDF → OCR only pages with markers
226-
- **Implementation options:**
227-
- Option A: `insert_markers` parameter in `pdf_read_pages`
228-
- Option B: Separate `content_map` structure (non-invasive)
229-
- **Code locations:** `src/pdf/extractor.ts`, `src/pdf/text.ts`, `src/handlers/readPages.ts`
230-
- **Alternative:** Enhance `pdf_get_page_stats` with `has_suspected_tables` flag
231-
232230
- [ ] **Build Mistral Vision wrapper service**
233231
- Simple Express.js/Node.js HTTP server
234232
- Translates pdf-reader-mcp format → Mistral Vision API
@@ -471,7 +469,9 @@ See `/home/martinm/programme/python_projects/mistral_ocr_processor/mistral_ocr_p
471469
- Lines 417-422: OCR API usage (document-level)
472470
- Lines 200-206: Data URI construction for images
473471

474-
## Feature Request: Content Markers in Text Extraction
472+
## ✅ Implemented Feature: Content Markers in Text Extraction
473+
474+
**Status:** ✅ Implemented in v1.4.0 (commits 6b1778e, ee633b4)
475475

476476
### Problem Statement
477477

@@ -491,9 +491,9 @@ See `/home/martinm/programme/python_projects/mistral_ocr_processor/mistral_ocr_p
491491

492492
**Impact:** For 800-page documents, client can't efficiently decide which pages need OCR without additional logic.
493493

494-
### Proposed Solution
494+
### ✅ Implemented Solution
495495

496-
#### Option A: Insert Markers (Inline approach)
496+
#### Option A: Insert Markers (Inline approach) - **IMPLEMENTED**
497497

498498
```json
499499
{
@@ -521,7 +521,7 @@ See `/home/martinm/programme/python_projects/mistral_ocr_processor/mistral_ocr_p
521521
- Modifies text output (breaking change if not opt-in)
522522
- Marker format needs to be well-defined
523523

524-
#### Option B: Content Map (Metadata approach)
524+
#### Option B: Content Map (Metadata approach) - **NOT IMPLEMENTED**
525525

526526
```json
527527
{

0 commit comments

Comments
 (0)