This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from lxml import etree | |
def create_hocr_document(target_page_bbox, lines): | |
# Create the root <html> element with namespaces and language attributes | |
XML_NS = "http://www.w3.org/XML/1998/namespace" | |
# Create the <html> element with attributes |