Skip to content

Invalid PageXML after prediction #18

Description

@CrazyCrud

Hi,

I used the kraken ocrd_wrapper to detect text lines. When doing predictions with party, the TextEquiv as well as the Unicode elements that get added, have no namespace. F.ex.:

<pc:TextRegion id="region_4"> <pc:Coords points="76,2270 373,2275 404,2280 410,2310 363,2336 78,2336 62,2315"/> <pc:TextLine id="region_4_line_98" custom="language {type: fra;}"> <pc:Coords points="398,2279 385,2276 372,2275 359,2274 347,2274 342,2276 151,2271 151,2296 151,2309 400,2310 402,2296 402,2279"/> <pc:Baseline points="151,2296 402,2296"/> <TextEquiv> <Unicode>1Rissier anno 1570</Unicode> </TextEquiv> </pc:TextLine> ...

The addition of the TextEquiv and Unicde happens here:

for el in line:

Is there any recommendations how to handle this, so the recognized PageXML would be still valid? Should i f.ex. implement a helper script that adapts the probably already used namespace?

Thank you in advance!

Best regards
Constantin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions