Fix pdfoxide parser smashed text issues - #22
Conversation
- Add `preprocess_text` function to `pdfparser/pdfoxide_parser.py` to fix smashed currency amounts (e.g., `0.0026,000.00` -> `0.00\n26,000.00`). - Use double-pass regex substitution to handle chained smashed amounts. - Update `parse_pdf_pdfoxide` to invoke `preprocess_text` on extracted text. - Add unit tests in `tests/test_pdfoxide_preprocessing.py`. Co-authored-by: rager306 <248269686+rager306@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
WalkthroughA new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implemented
preprocess_textinpdfparser/pdfoxide_parser.pyto resolve issue wherepdf_oxideextraction merges consecutive currency amounts. The fix inserts newlines between smashed amounts to restore the line-based structure expected byextract_transactions. Added comprehensive tests to verify the fix.PR created automatically by Jules for task 16596587119210642408 started by @rager306
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.