2019-12-09 12:44:05 +01:00
dinglehopper
============
2019-08-14 15:32:50 +02:00
2019-12-09 12:44:05 +01: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-12-09 12:44:05 +01:00
[](https://travis-ci.org/qurator-spk/dinglehopper)
2019-08-14 18:29:49 +02:00
2019-12-09 12:44:05 +01:00
Goals
-----
* Useful
* As a UI tool
* For an automated evaluation
* As a library
* Unicode support
2019-08-15 10:35:26 +02:00
2019-12-09 12:44:05 +01:00
Installation
------------
It's best to use pip, e.g.:
~~~
sudo pip install .
~~~
2019-08-15 17:52:41 +02:00
2019-12-09 12:44:05 +01:00
Usage
-----
~~~
dinglehopper some-document.gt.page.xml some-document.ocr.alto.xml
~~~
This generates `report.html` and `report.json` .
2019-08-15 17:52:41 +02:00
2019-08-15 17:25:54 +02:00
2019-12-09 12:44:05 +01:00
As a OCR-D processor:
2019-11-18 16:32:42 +01:00
~~~
2019-12-09 12:44:05 +01:00
ocrd-dinglehopper -m mets.xml -I OCR-D-GT-PAGE,OCR-D-OCR-TESS -O OCR-D-OCR-TESS-EVAL
2019-11-18 16:32:42 +01:00
~~~
2019-12-09 12:44:05 +01:00
This generates HTML and JSON reports in the `OCR-D-OCR-TESS-EVAL` filegroup.
2019-12-09 11:57:16 +01:00
2019-12-09 12:44:05 +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
~~~