Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.6.0
-
None
-
None
-
I’m using a
smart toasterPC running Linux Mint 20.1 (Ulyssa), MATE edition.
Description
While doing some tests with Tika for text extraction from EPUB, I ran into what looks like an inconsistency between the behavior of Tika-app and Tika-server.
I’m using below EPUB file as an example:
https://www.dbnl.org/tekst/berk011veel01_01/ebook/berk011veel01_01.epub
Using the tika-app JAR, I can extract the text from this EPUB using this command:
java -jar ~/tika/tika-app-2.6.0.jar -t berk011veel01_01.epub > berk011veel01_01_tika-app.txt
Output in this case is as expected.
So then I tried this using the server. After firing up the server I use this:
curl -T berk011veel01_01.epub http://localhost:9998/tika --header "Accept: text/plain" > berk011veel01_01-tika-server.txt
In this case, Tika’s output contains elements (between square brackets) with alt-text descriptions of images. For example (from the first page of this book):
[image: cover] Aster Berkhof Veel geluk, professor! [image: DBNL] Colofon
These image references + alt-text description don't appear in the tika-app output! Not sure if this is the intended behavior, or perhaps I’m doing something wrong myself, or I’m missing some obvious option?
See also this related Tika-python issue (I initially thought this was a Tika-python problem, which on closer inspection it isn't):
https://github.com/chrismattmann/tika-python/issues/389