2019-08-14 15:32:50 +02:00
dinglehopper
============
2019-08-15 14:39:35 +02:00
dinglehopper is an OCR evaluation tool and reads [ALTO ](https://github.com/altoxml ), [PAGE ](https://github.com/PRImA-Research-Lab/PAGE-XML ) and text files.
2019-08-14 18:29:49 +02:00
2019-08-16 14:01:53 +02:00
[](https://travis-ci.org/qurator-spk/dinglehopper)
2019-08-14 18:29:49 +02:00
2019-08-15 10:35:26 +02:00
Goals
-----
* Useful
2019-11-06 14:54:25 +01:00
* As a UI tool
2019-08-15 10:35:26 +02:00
* For an automated evaluation
* As a library
2019-08-15 10:38:05 +02:00
* Unicode support
2019-08-15 10:35:26 +02:00
2019-11-18 16:32:42 +01:00
Installation
------------
It's best to use pip, e.g.:
~~~
sudo pip install .
~~~
2019-08-15 17:25:54 +02:00
Usage
-----
2019-08-15 17:52:41 +02:00
~~~
dinglehopper some-document.gt.page.xml some-document.ocr.alto.xml
~~~
This generates `report.html` and `report.json` .
2019-08-15 17:25:54 +02:00
As a OCR-D processor:
~~~
ocrd-dinglehopper -m mets.xml -I OCR-D-GT-PAGE,OCR-D-OCR-TESS -O OCR-D-OCR-TESS-EVAL
~~~
This generates HTML and JSON reports in the `OCR-D-OCR-TESS-EVAL` filegroup.
2019-08-14 18:29:49 +02:00

2019-11-18 16:32:42 +01:00
Testing
-------
Use `pytest` to run the tests in [the tests directory ](qurator/dinglehopper/tests ):
~~~
virtualenv -p /usr/bin/python3 venv
. venv/bin/activate
pip install -r requirements.txt
pip install pytest
pytest
~~~