4 ms·
Once a year when I do my taxes I go through every single bank transaction and classify it into a proper column in a spreadsheet. The problem is that my bank pro
by poxrud 7y ago
Once a year when I do my taxes I go through every single bank transaction and classify it into a proper column in a spreadsheet. The problem is that my bank provides CSV transaction data for the past 6 months only. But it does provide years of bank statements in PDF format.
I decided I can save a lot of time by using Amazon Textract to extract the tables from the PDF's and convert them to CSV files.
The problem is that while Textract works really well for well defined tabular data it does not work for tables where the rows and columns are implied with white space, instead of lines. When I reached out to aws they confirmed this problem and suggested that I draw the table lines into the PDF and then run textract again on this modified pdf. This felt like a dirty hack so I did not proceed with this suggestion.
Textract is a great tool when it works well, but unfortunately when it doesn't there are no ways to make adjustments in order to improve the results. In the end I managed to complete my project and get a lot better results by using the excellent Camelot Python table extraction library.
- ocrcustomserver 7y ago"The problem is that while Textract works really well for well defined tabular data it does not work for tables where the rows and columns are implied with white space, instead of lines." This is what Tabula and Camelot call "Stream" and "Lattice" parsing methods. Whitespace between cells is Stream, demarcated lines is Lattice.