code4romania / code4romania/catalog-avere-client
[ocr] Research ways of cutting printed statements into smaller subsections
- Dominant language
- Elm
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Since OCR has better results on printed statements, we want to cut the statements into the pieces with text that we can feed to the Google OCR API.
An example statement: http://declaratii.integritate.eu/UserFiles/PDFfiles/RP1119_186165-C77-I780_5-ANI-L524-00001[011230]ready//DA_2016-06-10_PONTA%20VICTOR%20VIOREL_70438189.pdf
We first want to get the tables. Here we need to find out how we can connect tables that start on one page and finish on another. Then, we take each table and we cut the cells, while keeping a reference to the column to which they belong.
Steps:
- convert PDFs to images
- cut the tables out
- take each table and cut the cells out
- feed the cells to Google OCR API and build a text representation of the statement
The final version should look like a tree:
```
- name: Victor Ponta
position: DEPUTAT
institution: PARLAMENTUL ROMÂNIEI
lands:
- location
- area
...
buildings:
- location
- area
```
Contributor guide
Assessment
This issue has not been assessed yet.