source: gs2-extensions/tesseract/trunk/src/setup.bash_old@ 34178

Last change on this file since 34178 was 34178, checked in by ak19, 4 years ago

CASCADE-MAKE for Tesseract, the OCR tool. I'm thinking of expanding the UnknownPlugin tutorial to include using it with Tika for processing docx and for using the Pluging with Tika and Tesseract to OCR image-only pdfs. I have tested the compiled tesseract and on a sample tif image, and it works. But I've still to test the Tika with Tesseract combination. The libz, libpng, (lib)jpeg, (lib)tif and jpeg2000 packages are from Imagemagick. Leptonica needs them (not sure about jpeg2000) and libgif. No libgif yet. Libtool and Leptonica are the dependencies for Tesseract itself. I'm including just the English language data in tessdata folder. Others are available from https://github.com/tesseract-ocr/tessdata . I've added a file called LinksAndNotesOnCompilingManually.txt documenting reading on TikaOCR, how to compile up Tesseract and my pre cascade-make attempts to compile tesseract on Ubuntu. But then I followed the existing use of Cascade-Make in GS2-extensions gnome-lib and imagemagick to get Tesseract compiled up. I don't know how to add in support for cross compilation.

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1extdesc="the Tesseract OCR support library extension"
2
3full_setup=`pwd`/${BASH_SOURCE}
4fulldir=${full_setup%/*}
5fulldir=${fulldir%/.}
6
7if [ "x$GSDLHOME" = "x" ] ; then
8 if [ -e ../../setup.bash ] ; then
9 export gsopt_noexts=1 && pushd ../.. && source ./setup.bash && popd
10 export gsopt_noexts=
11 elif [ -e ../../gs3-setup.sh ] ; then
12 export gsopt_noexts=1 && pushd ../.. && source ./gs3-setup.sh && popd
13 export gsopt_noexts=
14 fi
15fi
16
17if [ "x$GEXTTESS" = "x" ] ; then
18 export GEXTTESS=$fulldir
19 export GEXTTESS_INSTALLED=$GEXTTESS/$GSDLOS
20
21 # tesseract needs the TESSDATA_PREFIX env var set to the languages folder (tessdata)
22 export TESSDATA_PREFIX=$GEXTTESS_INSTALLED/tessdata
23
24 export PATH=$GEXTTESS_INSTALLED/bin:$PATH
25
26 # if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
27 # export LD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib
28 # else
29 # export LD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib:$LD_LIBRARY_PATH
30 # fi
31 # if [ "x$DYLD_LIBRARY_PATH" = "x" ] ; then
32 # export DYLD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib
33 # else
34 # export DYLD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib:$DYLD_LIBRARY_PATH
35 # fi
36 #
37 # if [ -e "devel-srcpack" ] ; then
38 # export LD_LIBRARY_PATH=$GEXTTESS_INSTALLED/devel/lib:$LD_LIBRARY_PATH
39 # export DYLD_LIBRARY_PATH=$GEXTTESS_INSTALLED/devel/lib:$DYLD_LIBRARY_PATH
40 # fi
41
42
43 extdir=${GEXTTESS##*/}
44
45 if [ "x$GSDLEXTS" = "x" ] ; then
46 export GSDLEXTS=$extdir
47 else
48 export GSDLEXTS=$GSDLEXTS:$extdir
49 fi
50
51
52 echo "+Your environment is now setup for $extdesc"
53else
54 echo "+Your environment is already setup for $extdesc"
55fi
Note: See TracBrowser for help on using the repository browser.