-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow global fptrs in structMap #142
Comments
@tboenig Pls. have a look! |
Even thought they are related, I think we should separate the (more complex) issue of support for logical structMaps from document-wide files. The latter seems more urgent, especially after our discussions about the METS conventions at SLUB, ULBH and SBB. Currently, adding a file to a workspace without specifying a page ID adds the file to the I agree on the METS structure you propose, with two exceptions: <mets:fileGrp USE="OCR-D-IMG">
<mets:file MIMETYPE="image/tiff" ID="TIFF-input">
<mets:FLocat .../>
</mets:file>
<mets:file MIMETYPE="image/tiff" ID="TIFF-split_0001">
<mets:FLocat .../>
</mets:file>
<mets:file MIMETYPE="image/tiff" ID="TIFF-split_0002">
<mets:FLocat .../>
</mets:file>
...
</mets:fileGrp> I don't think it's a good idea to mix multi-page and single-page documents in the same <mets:structMap TYPE="PHYSICAL">
<mets:div ID="physroot" TYPE="physSequence">
<mets:div ID=... ORDER=... TYPE="page">
<mets:fptr FILEID="TIFF-split_0001"/>
<mets:fptr FILEID="OCR-D-SEG-PAGE_0001"/>
<mets:fptr .../>
</mets:div>
...
<mets:fptr FILEID="TIFF-input"/>
<mets:fptr FILEID="TEI-output"/>
<mets:fptr FILEID="PDF-output"/>
</mets:div>
</mets:structMap> Minor thing but I think the files should be at the top, before the first |
Agreed. One at a time.
Right. But you can do it with the API ( On the other hand, there is (so far) no API to add anything to the logical structmap (if you are so inclined), yet. You can of course try to traverse the existing structmap and insert elements at the right level via lxml – but that's 1. hard to get implemented correctly (there are lots of different cases for the top levels, depending on the item type) and 2. hard to read/share and maintain. So, we have:
The question of course is: which one is correct (for lack of a better word)? On that point @M3ssman and I already had an interesting discussion in digital-derivans:
Now, if pointing to already existing spec language on the subject does not ring the alarm for you, I don't know what to say. Somehow, this entire discussion (to which admittedly I did contribute, along with @tboenig) went completely parallel, and it never actually affected core (there's not even an issue tracking new behaviour like Thus IMHO first we should discuss whether we really want the existing formulation (esp. around the Finally, addressing your last points...
Why not? A fileGrp for PDFs could have both single-page files and a global file (this is what SLUB does), likewise for TEI. Or take evaluation reports (where you usually want to have both single-page and aggregated views). I feel like we should try not to put too much of our own assumptions in here. If SLUB already does that kind of thing, perhaps others made the same choices.
Ok, but that's a subordinate problem. Sure, for our processors, it must be crystal clear how this case should be handled. But PDF and TEI is never on the input side of a processor. And if we do manage to find a solution for the ambiguity of global vs single-page files on the input side (like say via an option for the processor implementor), then we will also be able to accept multi-page TIFF input directly. (Just saying.)
Agreed. |
Currently, we only specify how to describe the hierarchy of pages (represented by a set of files under
mets:structMap/mets:div/mets:div
) and their order. But nothing so far on logical structure across pages (table of contents, viamets:structMap TYPE="LOGICAL"
andmets:smLink
) or other global representations. For the latter METS offers adding a set of files (mets:fptr
s) directly under the topmets:structMap/mets:div
– this would allow pointing to other file formats representing the complete document on some level, e.g.:These could each reside in dedicated
mets:fileGrp
s, so (with a little work) even our notion of workspace processor (reading from input file groups and writing to output file groups) could be generalized to allow encapsulating such converters within normal OCR-D CLIs.For example, schematically, we could have:
Related: #40. (The issue of conventions for logical structure has also been touched by #80 and OCR-D/core#304 before.)
The text was updated successfully, but these errors were encountered: