Skip to content
Digital humanities

Potato for digital humanities

Correct Transkribus or eScriptorium HTR line by line, annotate IIIF manuscripts, and tag entities in TEI editions with a free, self-hosted tool.

Potato corrects handwritten text recognition line by line, annotates manuscript images from IIIF manifests, and tags people and places in TEI editions, then writes the corrected work back as PAGE XML, IIIF annotations, W3C Web Annotation, or TEI. Potato is free and open source and runs on your own server.

Most humanities annotation starts from an automated pass or an existing edition: HTR output from Transkribus or eScriptorium, a library's IIIF manifest, or a TEI file. The remaining work is a human one, often shared among students, volunteers, or a project team. Potato provides that step. Each importer builds a runnable project from the source, the source's own annotations arrive as pre-annotations that a person confirms or corrects, and each exporter writes the corrected work back in the same format.

Digital humanities tasks in Potato

Each row is a workflow that one importer and exporter pair supports, described on the digital humanities formats page.

TaskHow Potato does itFormats
Correct HTR or OCR outputOne item per text line, cropped from the page image, corrected in a text_edit scheme that shows a word diff against the machine readingPAGE XML from Transkribus, eScriptorium, or OCR-D
Correct page layoutOne item per page, with every region and line as a polygon labeled by region typePAGE XML (--page-xml-mode regions)
Annotate manuscript imagesOne item per IIIF canvas, with existing annotations as editable shapesIIIF Presentation 3 and 2.x manifests
Tag entities in an edition<persName>, <placeName>, <orgName>, <date>, and <rs> become editable spansTEI P5
Move annotations between viewersText quotes and image regions as W3C Web AnnotationAnnotorious, Mirador, Hypothesis
Run a crowdsourcing workflow privatelyA Zooniverse workflow becomes Potato schemes, and its classifications can import as saved workZooniverse project exports

Correcting HTR output from Transkribus or eScriptorium

The import reads a Transkribus or eScriptorium PAGE XML export, finds each page's image beside the XML or in --image-dir, and writes a project. Annotators then see one line at a time, cropped out of the page, with the recognized text ready to correct.

bash
potato import -f page_xml -i transkribus-export/ -o htr-project
python potato/flask_server.py start htr-project/config.yaml -p 8000
python -m potato.export -c htr-project/config.yaml -f page_xml -o corrected/

The page_xml export edits the project's copy of each PAGE XML file in place and keeps the rest of the file unchanged, so the corrected files can go back into the HTR tool as ground truth for training. When the recognizer stored a confidence for a line, the item stores that confidence as htr_confidence.

Working alongside Transkribus, eScriptorium, Zooniverse, and Recogito

Potato does not recognize handwriting and does not train HTR models. Transkribus and eScriptorium do both, and Potato corrects their output. Zooniverse is built for public volunteer projects with a review gate before launch, and Potato suits running the same workflow privately, with unpublished material, a lab team or paid transcribers. Recogito Studio is built for collaborative annotation of TEI, IIIF images and PDFs. Potato's additions are assignment of items to people, several annotators per item when a project needs a second opinion, and agreement measures over the annotators' answers.

Because Potato runs on your own server, archival images and unpublished transcriptions stay on infrastructure you control. Every script, stylesheet, and font is served from the install, as described in air-gapped deployment.

Frequently asked questions

Can Potato correct Transkribus or eScriptorium output line by line?

Yes. potato import -f page_xml makes one item per TextLine in reading order, and the annotator corrects the recognized text against the line image in a text_edit scheme that shows a word diff. The page_xml export writes the corrections back into copies of the source files. Both the 2013-07-15 and 2019-07-15 PAGE schema versions are read.

Can several volunteers transcribe the same pages, and can I see where they disagree?

Yes. num_annotators_per_item sets how many people see each line or page, and each person's answer is stored separately. Potato 2.13.1 computes no agreement figure for corrected transcriptions, and the JSONL export gives each person's text for each line to compare. For tagged names and places, Adjudication shows how to review items where the annotators disagree and record a final version.

Can I load images from a IIIF manifest instead of uploading files?

Yes. potato import -f iiif takes a manifest file or an http(s) URL, and each canvas becomes one item whose image comes from the canvas's image or its Image service. The iiif_annotations export writes annotation pages and a copy of the manifest that references the pages, which Mirador and Universal Viewer open.

How is Potato different from running a project on Zooniverse?

Zooniverse hosts public projects and recruits volunteers for those projects. Potato runs on your own server, so Potato fits material you cannot publish or a closed team of annotators. potato import reads a Zooniverse project's workflow, subject and classification exports, so an existing workflow can move across, though survey and transcription tasks are not imported.

Further reading

Start here

Example designs

Each design is a working Potato configuration you can download and run.

DocLayNet Document Layout AnalysisDocument layout analysis with bounding box annotations. Annotators draw bounding boxes around layout elements (text blocks, tables, figures, headers, footers, lists) in document page images.DocBank Document Layout DetectionDocument layout analysis benchmark (Li et al., COLING 2020). Detect and classify document elements including titles, abstracts, paragraphs, figures, tables, and captions.DWIE Document-Level Entity Annotation and LinkingDocument-level entity mention annotation with knowledge-base linking based on DWIE (Zaporojets, Deleu, Develder, and Demeester, Information Processing & Management 2021). Annotators mark every entity mention in a full news article, assign an entity type, and link mentions to Wikipedia/Wikidata entries, leaving NIL entities unlinked. Complements the mention-level AIDA CoNLL-YAGO task (text/entity-linking/aida-conll-entity-disambiguation): AIDA presents one pre-marked mention at a time for disambiguation, whereas DWIE is entity-centric and document-level — annotators find all mentions themselves and keep links consistent across each entity's coreferent mentions.WikiArt Artwork ClassificationArt classification by style, genre, and artist (Saleh & Elgammal, 2015). Classify paintings into artistic movements, genres, and predict artist attribution.TimeLine: Cross-Document Event OrderingIdentify event mentions and temporal expressions in news text and classify temporal relations between events, based on SemEval-2015 Task 4 (Minard et al.). Annotators build timelines by ordering events related to a target entity across documents.

Other fields

All use cases