Giter VIP home page Giter VIP logo

Comments (6)

zuphilip avatar zuphilip commented on June 7, 2024

After the error message in the usage information you see the available transformations. Currently there are only alto2.0/alto2.1 to hocr transformations. Try to change the namespace of your file

+<alto xmlns="http://www.loc.gov/standards/alto/ns-v2#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v3# http://www.loc.gov/alto/v3/alto-3-0.xsd">
-<alto xmlns="http://www.loc.gov/standards/alto/ns-v3#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v3# http://www.loc.gov/alto/v3/alto-3-0.xsd">

and then use

ocr-transform alto2.0 hocr < alto.xml

I will create an issue upstream to support also other versions of alto in the transformations.

from ocr-fileformat.

filak avatar filak commented on June 7, 2024

ALTO v3 & v4 should be supported now.

from ocr-fileformat.

filak avatar filak commented on June 7, 2024

Have you tried https://github.com/filak/hOCR-to-ALTO/blob/master/alto__hocr.xsl ?

from ocr-fileformat.

zuphilip avatar zuphilip commented on June 7, 2024

I have seen the changes because they broke our test case in one PR. Therefore we switched to a fixed commit instead of the newest version always. But this is still on my todo list. Maybe I can do this now...

The different files alto*__hocr look almost identical. Therefore I would instead try to make a more generalized transformation alto__hocr which is applicable to alto files of different version. Should I try to do that as a PR?

We need to change then some things than here in order to integrate the new file names, but that can be done afterwards.

from ocr-fileformat.

filak avatar filak commented on June 7, 2024

I can confirm the transformation of the @jtlz2's file works now with the latest version https://github.com/filak/hOCR-to-ALTO/blob/master/alto__hocr.xsl

from ocr-fileformat.

zuphilip avatar zuphilip commented on June 7, 2024

Yes, thank you. This is updated in e0d9250, which is now part of v0.3.0.

from ocr-fileformat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.