i am following this tutorial here to use Tesseract libs for android. and in step(b) in the link posted, it says: b.export TESSERACT_PATH=${PWD}/external/tesseract-3.01
and in cygwin i wrote the following:
dm@me /cygdrive/e/Data/private/Fr/OCR/libs/tess-two-
master/tess-two-master/tess-two
but when i execute it i receive the belwo error:
$ export C:\Program Files (x86)\Tesseract-OCR=${PWD}\external\tesseract-3.01
-bash: syntax error near unexpected token `('
please let me know how to fix it, as i am a beginner to cygwin.
update:
i tried ezrepotein4 answer, and now it gives me "not a valid identifier". please , let me know what is "external\tesseract-3.01", i do not have these files/folders...and what is PWD. thanks
In this tutorial author uses few linux commands:
cdwhich changes directory - it is an equevalent of windowsdirexportwhich sets environment variableBefore exporting any variable you should change directory to your project dir, because all
$PWDstrings in further commands will be replaced by your current directory.This tutorial assumes that you compiled tesseract and leptonica and you keep them in project-dir/tess-two/external directory as tesseract-3.01 and leptonica-1.68. Source code for those libraries are in
tess-two/jnidirectory in repository as stated in README.md https://github.com/rmtheis/tess-two/blob/master/README.mdCode which you are trying yo execute is incorrect both syntactically and semantically. It is incorrect syntactically because you all spaces are treated as separators between arguments. Semantically you are trying to set variable
C:\Program Files (x86)\Tesseract-OCRto value of${PWD}\external\tesseract-3.01. Instead you should setTESSERACT_PATHvariable.To do this try command
TESSERACT_PATH=${PWD}/external/tesseract-3.01as stated in tutorial. This means that you are setting variableTESSERACT_PATHto folder external/tesseract-3.01 in your current dir.To further inspect a value of this variable type: echo $TESSERACT_PATH.