Skip to content
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

ADD script to create a simplified version of hocr-files #152

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
ADD new tests and testfiles.
JKamlah authored and JKamlah committed Aug 7, 2019

Verified

This commit was signed with the committer’s verified signature.
macalinao Ian Macalinao
commit 4c44dea5679af96b4282a048928161f37bc8ed82
12 changes: 9 additions & 3 deletions test/hocr-simplify/hocr-simplify.tsht
Original file line number Diff line number Diff line change
@@ -2,10 +2,16 @@
TESTDATA="../testdata"
SIMPLEFILE="./tess.simple.hocr"

plan 5
plan 3

after () {
rm -f "$SIMPLEFILE"
}
hocr-simplify "$TESTDATA/tess.hocr" -t page > "$SIMPLEFILE" || fail 'hocr-simplify'
equals 3870 $(ls -l "$SIMPLEFILE" | cut -d " " -f5 ) 'filesize == 3870'
hocr-simplify "$TESTDATA/tess.hocr" -t ocr_page > "$SIMPLEFILE" || fail 'hocr-simplify'
equals 3268 $(ls -l "$SIMPLEFILE" | cut -d " " -f5 ) 'filesize == 3268'

hocr-simplify "$TESTDATA/tess_choices.hocr" -c -t ocr_line > "$SIMPLEFILE" || fail 'hocr-simplify'
equals 9691 $(ls -l "$SIMPLEFILE" | cut -d " " -f5 ) 'filesize == 9691'

hocr-simplify "$TESTDATA/tess_choices_charboxes.hocr" -c -t ocrx_word > "$SIMPLEFILE" || fail 'hocr-simplify'
equals 58622 $(ls -l "$SIMPLEFILE" | cut -d " " -f5 ) 'filesize == 58622'
10,221 changes: 10,221 additions & 0 deletions test/testdata/tess_choices.hocr

Large diffs are not rendered by default.

13,146 changes: 13,146 additions & 0 deletions test/testdata/tess_choices_charboxes.hocr

Large diffs are not rendered by default.