Skip to content

Commit

Permalink
⬆️ Upgrade to new version of hOCR-to-ALTO
Browse files Browse the repository at this point in the history
The transformations alto2.0__hocr and alto2.1__hocr are
temporarily kept in order to make it backwards compatible.
  • Loading branch information
zuphilip authored and stweil committed Jan 9, 2020
1 parent 70fd5eb commit e0d9250
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,15 @@ xsd: vendor
xslt: vendor
$(MKDIR) xslt
# symlink hocr<->alto as well as the language codes lookup xml
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr2alto2.0.xsl hocr__alto2.0.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr2alto2.1.xsl hocr__alto2.1.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/alto2hocr.xsl alto2.0__hocr.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/alto2hocr.xsl alto2.1__hocr.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr2text.xsl hocr__text.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/alto2text.xsl alto__text.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr__alto2.0.xsl hocr__alto2.0.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr__alto2.1.xsl hocr__alto2.1.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr__alto3.xsl hocr__alto3.0.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr__alto4.xsl hocr__alto4.0.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/alto__hocr.xsl alto__hocr.xsl
cd xslt && $(LN) alto__hocr.xsl alto2.0__hocr.xsl
cd xslt && $(LN) alto__hocr.xsl alto2.1__hocr.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/hocr__text.xsl hocr__text.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/alto__text.xsl alto__text.xsl
cd xslt && $(LN) ../vendor/hOCR-to-ALTO/codes_lookup.xml codes_lookup.xml
cd xslt && $(LN) ../vendor/format-converters/page2hocr.xsl page__hocr.xsl
cd xslt && $(LN) ../vendor/format-converters/abbyy2hocr.xsl abbyy__hocr.xsl
Expand Down
2 changes: 1 addition & 1 deletion example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ $(BASENAME).alto.page.alto : $(BASENAME).alto.page
$(OCR_TRANSFORM) page alto $< | $(XMLLINT) - > $@

$(BASENAME).roundtrip.hocr : $(BASENAME).alto
$(OCR_TRANSFORM) alto2.0 hocr $< | $(XMLLINT) - > $@
$(OCR_TRANSFORM) alto hocr $< | $(XMLLINT) - > $@

clean:
$(RM) $(BASENAME)*.hocr $(BASENAME)*.alto
2 changes: 1 addition & 1 deletion vendor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ABBYY_SCHEMA_VERSIONS = 6-schema-v1 8-schema-v2 9-schema-v1 10-schema-v1

HOCR2ALTO_REPO = hOCR-to-ALTO
HOCR2ALTO_URL = https://github.com/filak/$(HOCR2ALTO_REPO)
HOCR2ALTO_COMMITID = 43f9d9dcdd38d37071f8ef1998d377d21c9cadd2
HOCR2ALTO_COMMITID = 7b21c4727a099117ed00c4f335aa83d0392c919f

HOCR_SPEC_REPO = hocr-spec-python
HOCR_SPEC_URL = https://github.com/kba/$(HOCR_SPEC_REPO)
Expand Down

0 comments on commit e0d9250

Please sign in to comment.